Vegan-specific signature implies healthier metabolic profile: findings from diet-related multi-omics observational study based on different European populations

Statistical report for lipidom analysis


Authors and affiliations

Monika Cahova1,*, Anna Ouradova2,*, Giulio Ferrero3,4,*, Miriam Bratova1, Nikola Daskova1, Klara Dohnalova5, Marie Heczkova1, Karel Chalupsky5, Maria Kralova6,7, Marek Kuzma8, Filip Tichanek1, Lucie Najmanova8, Barbara Pardini10, Helena Pelantová8, Radislav Sedlacek5, Sonia Tarallo9, Petra Videnska10, Jan Gojda2,#, Alessio Naccarati9,#


* These authors have contributed equally to this work and share first authorship
# These authors have contributed equally to this work and share last authorship

1 Institute for Clinical and Experimental Medicine, Prague, Czech Republic
2 Department of Internal Medicine, Kralovske Vinohrady University Hospital and Third Faculty of Medicine, Charles University, Prague, Czech Republic 3 Department of Clinical and Biological Sciences, University of Turin, Turin, Italy
4 Department of Computer Science, University of Turin, Turin, Italy
5 Czech Centre for Phenogenomics, Institute of Molecular Genetics of the Czech Academy of Sciences, Prague, Czech Republic
6 Ambis University, Department of Economics and Management, Prague, Czech Republic
7 Department of Applied Mathematics and Computer Science, Masaryk University, Brno, Czech Republic
8 Institute of Microbiology of the Czech Academy of Sciences, Prague, Czech Republic
9 Italian Institute for Genomic Medicine (IIGM), c/o IRCCS Candiolo, Turin, Italy
10 Mendel University, Department of Chemistry and Biochemistry, Brno, Czech Republic


This is a statistical report of the study Vegan-specific signature implies healthier metabolic profile: findings from diet-related multi-omics observational study based on different European populations that is currenlty under review

When using this code or data, cite the original publication:

TO BE ADDED

BibTex citation for the original publication:

TO BE ADDED


Original GitHub repository: https://github.com/filip-tichanek/ItCzVegans

Statistical reports can be found on the reports hub.

Data analysis is described in detail in the statistical methods report.


1 Introduction

This project explores potential signatures of a vegan diet across the microbiome, metabolome, and lipidome. We used data from healthy vegan and omnivorous human subjects in two countries (Czech Republic and Italy), with subjects grouped by Country and Diet, resulting in four distinct groups.

To assess the generalizability of these findings, we validated our results with an independent cohort from the Czech Republic for external validation.

1.1 Statistical Methods

The statistical modeling approach is described in detail in this report. Briefly, the methods used included:

  • Multivariate analysis: We conducted multivariate analyses (PERMANOVA, PCA, correlation analyses) to explore the effects of diet, country, and their possible interaction (diet : country) on the microbiome, lipidome, and metabolome compositions in an integrative manner. This part of the analysis is not available on the GitHub page, but the code will be provided upon request.

  • Linear models: Linear models were applied to estimate the effects of diet, country, and their interaction (diet:country) on individual lipids, metabolites, bacterial taxa and pathways (“features”). Features that significantly differed between diet groups (based on the estimated average conditional effect of diet across both countries, adjusted for multiple comparisons with FDR < 0.05) were further examined in the independent external validation cohort to assess whether these associations were reproducible.

  • Predictive models (elastic net): We employed elastic net logistic regression (via the glmnet R package) to predict vegan status based on metabolome, lipidome, microbiome and pathways data (one model per dataset; four models in total). We considered three combinations of Lasso and Ridge penalties (alpha = 0, 0.2, 0.4). For each alpha, we selected the penalty strength (λ1se) using 10-fold cross-validation. This value corresponds to the most regularized model whose performance was within one standard error of the minimum deviance. The alpha–lambda pair with the lowest deviance was chosen to fit the final model, whose coefficients are reported.
    To estimate model performance, we repeated the full modeling procedure (including hyperparameter tuning) 500 times on bootstrap resamples of the training data. In each iteration, the model was trained on the resampled data and evaluated on the out-of-bag subjects (i.e., those not included in the training set in that iteration). The mean, and 2.5th, and 97.5th percentiles of the resulting ROC-AUC values represent the estimated out-of-sample AUC and its 95% confidence interval.
    Finally, the final model was applied to an independent validation cohort to generate predicted probabilities of vegan status. These probabilities were then used to assess external discrimination between diet groups (ROC-AUC in the independent validation cohort).

2 Initiation

2.1 Set home directory

Open code

setwd('/home/ticf/1_ticf_sec/478_MOCA_italian/')

2.2 Upload initiation file

Open code
source('478_initiation.R')

3 Data

3.1 Upload all original data

3.1.1 Training set

Open code
data_lipids_original <- read_excel('gitignore/data/lipidome_training_cohort_new names.xlsx')

data_lipids_original[1:20, 1:8]
## # A tibble: 20 × 8
##    Sample Country Diet  Group    `ACar 10:0` `ACar 18:1` `ACar 18:2` `CE 16:0`
##    <chr>  <chr>   <chr> <chr>          <dbl>       <dbl>       <dbl>     <dbl>
##  1 T119   CZ      VEGAN VEGAN_CZ      485972      830286      394205   2501105
##  2 T120   CZ      VEGAN VEGAN_CZ      168982      679607      495704   3671511
##  3 T126   CZ      VEGAN VEGAN_CZ      207250      446291      275926   3631550
##  4 T127   CZ      VEGAN VEGAN_CZ      163366      679319      353609   2945640
##  5 T129   CZ      VEGAN VEGAN_CZ      226570      477267      395476   2769955
##  6 T130   CZ      VEGAN VEGAN_CZ      442377      465342      357478   3330659
##  7 T132   CZ      VEGAN VEGAN_CZ       66755      301617      154108   3785938
##  8 T133   CZ      VEGAN VEGAN_CZ      202158      645033      455431   2555590
##  9 T134   CZ      OMNI  OMNI_CZ       277499      605067      157440   5007846
## 10 T136   CZ      OMNI  OMNI_CZ       116918      587156      199443   4281398
## 11 T137   CZ      OMNI  OMNI_CZ       185503      374239      131161   5445270
## 12 T140   CZ      VEGAN VEGAN_CZ      444503      595372      564156   4182758
## 13 T141   CZ      VEGAN VEGAN_CZ      239403      567469      366064   1947708
## 14 T143   CZ      VEGAN VEGAN_CZ      418116      759311      430601   2940008
## 15 T144   CZ      VEGAN VEGAN_CZ      308505      660653      362166   4333696
## 16 T145   CZ      OMNI  OMNI_CZ       183471      553767      245557   3862092
## 17 T146   CZ      OMNI  OMNI_CZ           NA          NA          NA        NA
## 18 T147   CZ      VEGAN VEGAN_CZ      120291      994429      586178   3214800
## 19 T148   CZ      OMNI  OMNI_CZ       300126      700749      245546   3543789
## 20 T149   CZ      OMNI  OMNI_CZ       303945      417989      200962   4821268
names(data_lipids_original)
##   [1] "Sample"            "Country"           "Diet"             
##   [4] "Group"             "ACar 10:0"         "ACar 18:1"        
##   [7] "ACar 18:2"         "CE 16:0"           "CE 16:1"          
##  [10] "CE 18:1"           "CE 18:2"           "CE 18:3"          
##  [13] "CE 20:3"           "CE 20:4"           "CE 22:6"          
##  [16] "Cer 18:1_22:0;O2"  "Cer 18:1_23:0;O2"  "Cer 18:1_24:1;O2" 
##  [19] "Cer 18:1_24:0;O2"  "LPC 0:0/16:0"      "LPC 0:0/18:0"     
##  [22] "LPC 0:0/18:1"      "LPC 0:0/18:2"      "LPC 15:0/0:0"     
##  [25] "LPC 16:0/0:0"      "LPC 16:1/0:0"      "LPC 17:0/0:0"     
##  [28] "LPC 18:0/0:0"      "LPC 18:1/0:0"      "LPC 18:2/0:0"     
##  [31] "LPC 20:1/0:0"      "LPC 20:4/0:0"      "LPC 20:5/0:0"     
##  [34] "LPC 22:6/0:0"      "PC 14:0_16:0"      "PC 14:0_18:2"     
##  [37] "PC 14:0_20:4"      "PC 15:0_18:2"      "PC 15:1_18:1"     
##  [40] "PC 16:0_16:0"      "PC 16:0_16:1"      "PC 16:0_18:0"     
##  [43] "PC 16:0_18:1"      "PC 16:0_18:2"      "PC 16:0_18:3"     
##  [46] "PC 16:0_20:3"      "PC 16:0_20:3 (2)"  "PC 16:0_20:4"     
##  [49] "PC 16:0_20:4 (2)"  "PC 16:0_20:5"      "PC 16:0_22:4"     
##  [52] "PC 16:0_22:6"      "PC 16:1_18:2"      "PC 16:1_20:4"     
##  [55] "PC 17:0_18:1"      "PC 17:0_18:2"      "PC 17:0_18:2 (2)" 
##  [58] "PC 17:0_20:3"      "PC 18:0_18:1"      "PC 18:0_20:1"     
##  [61] "PC 18:0_20:3"      "PC 18:0_20:4"      "PC 18:0_22:5"     
##  [64] "PC 18:0_22:6"      "PC 18:1_18:2"      "PC 18:1_20:3"     
##  [67] "PC 18:1_20:4"      "PC 18:1_22:6"      "PC 18:2_18:2"     
##  [70] "PC 18:2_18:3"      "PC 18:2_20:4"      "PC 37:6"          
##  [73] "SM 30:1;O2"        "SM 32:0;O2"        "SM 32:2;O2"       
##  [76] "SM 33:1;O2"        "SM 34:0;O2"        "SM 34:1;O2"       
##  [79] "SM 34:2;O2"        "SM 35:2;O2"        "SM 36:0;O2"       
##  [82] "SM 36:2;O2"        "SM 38:1;O2"        "SM 38:2;O2"       
##  [85] "SM 39:1;O2"        "SM 40:1;O2"        "SM 40:2;O2"       
##  [88] "SM 40:2;O2 (2)"    "SM 41:1;O2"        "SM 41:2;O2"       
##  [91] "SM 42:1;O2"        "SM 42:2;O2"        "SM 42:3;O2"       
##  [94] "SM 43:1;O2"        "SM 43:1;O2 (2)"    "SM 43:2;O2"       
##  [97] "SM 43:2;O2 (2)"    "TG 12:0_14:0_16:0" "TG 12:0_14:0_18:1"
## [100] "TG 12:0_16:0_18:1" "TG 12:0_18:1_18:2" "TG 12:0_18:2_18:2"
## [103] "TG 14:0_16:0_16:0" "TG 14:0_16:0_18:1" "TG 14:0_16:0_18:2"
## [106] "TG 14:0_18:2_18:2" "TG 15:0_16:0_16:0" "TG 15:0_16:0_18:2"
## [109] "TG 15:0_18:1_18:2" "TG 16:0_16:0_16:0" "TG 16:0_16:0_18:0"
## [112] "TG 16:0_16:0_18:1" "TG 16:0_16:1_18:1" "TG 16:0_17:0_18:1"
## [115] "TG 16:0_18:0_18:1" "TG 16:0_18:1_18:1" "TG 16:0_18:1_18:2"
## [118] "TG 16:0_18:1_18:3" "TG 16:0_18:1_20:4" "TG 17:0_18:1_18:1"
## [121] "TG 18:0_18:1_18:1" "TG 18:0_18:1_20:4" "TG 18:1_18:1_18:1"
## [124] "TG 18:1_18:1_18:2" "TG 18:1_18:2_18:2" "TG 18:1_18:2_18:3"
## [127] "ACar 16:0"         "LPC 0:0/19:0"      "LPC 0:0/20:4"     
## [130] "LPC 0:0/20:3"      "LPC 20:2/0:0"      "LPC 20:0/0:0"     
## [133] "DG 16:0_18:1"      "DG 18:1_18:2"      "DG 18:1_18:1"     
## [136] "SM 31:1;O2"        "PC 12:0_16:0"      "TG 12:0_12:0_16:0"
## [139] "PC 14:0_17:0"      "PC 33:1"           "PC 33:0"          
## [142] "TG 12:0_14:0_18:2" "PC 15:0_20:4"      "PC 15:0_20:3"     
## [145] "PC 14:0_22:6"      "PC 18:1_18:1"      "PC 18:0_18:2"     
## [148] "PC 15:1_22:6"      "PC 36:0"           "PC 17:0_20:5"     
## [151] "PC 17:0_20:5 (2)"  "PC 37:4"           "PC 38:5"          
## [154] "PC 38:3"           "SM 44:2;O2"        "TG 16:0_16:0_18:3"
## [157] "PC 42:5"           "PC 20:1_22:1"      "TG 16:0_18:2_18:3"
## [160] "TG 16:0_18:2_18:2" "TG 54:6"           "PC 43:2"          
## [163] "TG 18:2_18:2_18:3" "TG 18:0_18:0_18:1" "PC 45:2"          
## [166] "TG 16:0_18:2_22:6" "TG 18:1_18:2_20:4" "TG 16:0_18:1_22:6"
## [169] "TG 18:1_18:1_20:4"

3.1.2 Validation set

Open code
data_lipids_validation <- read.csv('gitignore/data/KOMPAS_data_lipid.csv')

data_lipids_validation <- data_lipids_validation %>%
  select(-Class) %>%                           # Remove 'Class' column
  column_to_rownames(var = "Molecule") %>%     # Use 'Molecule' as rownames
  t() %>%                                      # Transpose the data
  as.data.frame() %>% 
  mutate(X2 = if_else(grepl('VG', rownames(.)), 'VEGAN', 'OMNI')) %>% 
  select(X2, everything()) %>% 
  mutate(across(`ACar 16:0` : `TG 54:6`, ~ as.numeric(.)))
## Warning: There were 75 warnings in `mutate()`.
## The first warning was:
## ℹ In argument: `across(`ACar 16:0`:`TG 54:6`, ~as.numeric(.))`.
## Caused by warning:
## ! NAs introduced by coercion
## ℹ Run `dplyr::last_dplyr_warnings()` to see the 74 remaining warnings.

data_lipids_validation %>% summary()
##       X2              ACar 16:0       ACar 18:1        ACar 18:2    
##  Length:137         Min.   : 3105   Min.   : 16654   Min.   : 2405  
##  Class :character   1st Qu.:14618   1st Qu.: 35548   1st Qu.:16249  
##  Mode  :character   Median :19738   Median : 48093   Median :22819  
##                     Mean   :21119   Mean   : 48416   Mean   :25693  
##                     3rd Qu.:26256   3rd Qu.: 57027   3rd Qu.:32800  
##                     Max.   :56338   Max.   :114091   Max.   :79836  
##                     NA's   :1       NA's   :1        NA's   :1      
##     CE 16:1          CE 20:3          CE 20:4           CE 22:6      
##  Min.   :  1195   Min.   :  1843   Min.   :    504   Min.   :  2533  
##  1st Qu.:  5068   1st Qu.: 23832   1st Qu.: 262351   1st Qu.: 14997  
##  Median : 10410   Median : 37536   Median : 512494   Median : 27220  
##  Mean   : 20844   Mean   : 44009   Mean   : 622937   Mean   : 33622  
##  3rd Qu.: 23020   3rd Qu.: 56702   3rd Qu.: 832295   3rd Qu.: 39395  
##  Max.   :261203   Max.   :187781   Max.   :3877230   Max.   :189426  
##  NA's   :1        NA's   :1        NA's   :1         NA's   :1       
##  Cer 18:1_22:0;O2 Cer 18:1_23:0;O2  Cer 18:1_24:0;O2 Cer 18:1_24:1;O2
##  Min.   :16493    Min.   : 735377   Min.   : 47479   Min.   :  7235  
##  1st Qu.:30230    1st Qu.:1443227   1st Qu.:100887   1st Qu.: 32376  
##  Median :37230    Median :1877141   Median :122902   Median : 40750  
##  Mean   :39025    Mean   :2060111   Mean   :127209   Mean   : 43702  
##  3rd Qu.:46076    3rd Qu.:2525402   3rd Qu.:150147   3rd Qu.: 53440  
##  Max.   :88614    Max.   :6516380   Max.   :295896   Max.   :104732  
##                                                                      
##   DG 16:0_18:1    LPC 18:2/0:0      LPC 20:1/0:0    LPC 20:2/0:0  
##  Min.   : 1000   Min.   : 253511   Min.   : 3688   Min.   : 2190  
##  1st Qu.: 2928   1st Qu.:1147544   1st Qu.:14274   1st Qu.:10582  
##  Median : 5082   Median :1538499   Median :19933   Median :14102  
##  Mean   : 7206   Mean   :1553751   Mean   :21774   Mean   :14993  
##  3rd Qu.: 8099   3rd Qu.:1842995   3rd Qu.:27348   3rd Qu.:18442  
##  Max.   :66420   Max.   :3317215   Max.   :55519   Max.   :37049  
##  NA's   :1       NA's   :1         NA's   :1       NA's   :1      
##   LPC 20:5/0:0    LPC 22:6/0:0     PC 12:0_16:0     PC 14:0_16:0    
##  Min.   : 2137   Min.   : 14762   Min.   :327834   Min.   :  56583  
##  1st Qu.:13318   1st Qu.: 28177   1st Qu.:618116   1st Qu.: 201557  
##  Median :18994   Median : 42394   Median :654928   Median : 353536  
##  Mean   :23777   Mean   : 47115   Mean   :661885   Mean   : 442713  
##  3rd Qu.:29316   3rd Qu.: 56830   3rd Qu.:702843   3rd Qu.: 596656  
##  Max.   :76921   Max.   :176658   Max.   :893428   Max.   :1601465  
##  NA's   :1       NA's   :1        NA's   :1        NA's   :1        
##   PC 14:0_17:0     PC 14:0_20:4     PC 14:0_22:6     PC 15:0_18:2   
##  Min.   :  8394   Min.   : 26007   Min.   :  8629   Min.   : 40208  
##  1st Qu.: 22080   1st Qu.: 91871   1st Qu.: 28211   1st Qu.: 74356  
##  Median : 34611   Median :121480   Median : 42192   Median :101402  
##  Mean   : 51284   Mean   :141565   Mean   : 50018   Mean   :102315  
##  3rd Qu.: 74651   3rd Qu.:180962   3rd Qu.: 64222   3rd Qu.:123628  
##  Max.   :198841   Max.   :376886   Max.   :192172   Max.   :282716  
##  NA's   :1        NA's   :1        NA's   :1        NA's   :1       
##   PC 15:0_20:3     PC 15:0_20:4     PC 16:0_16:0      PC 16:0_16:1    
##  Min.   :  1890   Min.   : 16910   Min.   : 438423   Min.   : 174121  
##  1st Qu.: 30889   1st Qu.: 48830   1st Qu.:1443588   1st Qu.: 845566  
##  Median : 51688   Median : 71402   Median :1792696   Median :1242018  
##  Mean   : 64540   Mean   : 94594   Mean   :1862244   Mean   :1607808  
##  3rd Qu.: 95494   3rd Qu.:128838   3rd Qu.:2204229   3rd Qu.:1936732  
##  Max.   :197252   Max.   :274808   Max.   :3632206   Max.   :7437691  
##  NA's   :1        NA's   :1        NA's   :1         NA's   :1        
##   PC 16:0_18:0     PC 16:0_18:1      PC 16:0_20:3 (2)   PC 16:0_20:5    
##  Min.   : 90235   Min.   : 7805584   Min.   :  87896   Min.   : 356035  
##  1st Qu.:269030   1st Qu.:22891274   1st Qu.: 327903   1st Qu.: 958784  
##  Median :325548   Median :28719500   Median : 507695   Median :1451619  
##  Mean   :338629   Mean   :30960594   Mean   : 543516   Mean   :1791903  
##  3rd Qu.:394915   3rd Qu.:35389268   3rd Qu.: 696916   3rd Qu.:2190898  
##  Max.   :615033   Max.   :74145401   Max.   :1598306   Max.   :8618008  
##  NA's   :1        NA's   :1          NA's   :1         NA's   :1        
##   PC 16:0_22:4      PC 16:0_22:6       PC 16:1_18:2      PC 17:0_18:1   
##  Min.   : 130956   Min.   : 1137944   Min.   :    739   Min.   : 93600  
##  1st Qu.: 482749   1st Qu.: 5529024   1st Qu.: 287009   1st Qu.:173240  
##  Median : 666748   Median : 7378897   Median : 370611   Median :234636  
##  Mean   : 753520   Mean   : 8559319   Mean   : 404192   Mean   :259309  
##  3rd Qu.: 998080   3rd Qu.:11166805   3rd Qu.: 500678   3rd Qu.:331051  
##  Max.   :1721660   Max.   :28824100   Max.   :1006277   Max.   :536297  
##  NA's   :1         NA's   :1          NA's   :1         NA's   :1       
##  PC 17:0_20:5 (2)  PC 18:0_18:1       PC 18:0_20:3       PC 18:0_22:5    
##  Min.   : 16840   Min.   :  709957   Min.   : 1374567   Min.   : 248326  
##  1st Qu.: 40780   1st Qu.: 3620754   1st Qu.: 2901049   1st Qu.: 662913  
##  Median : 48962   Median : 4385308   Median : 3856544   Median : 809702  
##  Mean   : 49489   Mean   : 4790628   Mean   : 4136454   Mean   : 871936  
##  3rd Qu.: 56773   3rd Qu.: 5568292   3rd Qu.: 5196424   3rd Qu.:1047551  
##  Max.   :112409   Max.   :11138393   Max.   :10293136   Max.   :1914018  
##  NA's   :1        NA's   :1          NA's   :1          NA's   :1        
##   PC 18:0_22:6      PC 18:1_18:1       PC 18:1_18:2       PC 18:1_20:3    
##  Min.   : 551164   Min.   : 1069952   Min.   : 1433817   Min.   : 268069  
##  1st Qu.:1425498   1st Qu.: 3022624   1st Qu.: 8548388   1st Qu.: 847311  
##  Median :2045472   Median : 3970476   Median :11532214   Median :1106978  
##  Mean   :2163303   Mean   : 4195750   Mean   :12098944   Mean   :1162823  
##  3rd Qu.:2606147   3rd Qu.: 4939155   3rd Qu.:14558844   3rd Qu.:1436406  
##  Max.   :5787744   Max.   :12098613   Max.   :30923660   Max.   :2831563  
##  NA's   :1         NA's   :1          NA's   :1          NA's   :1        
##   PC 18:1_20:4      PC 18:2_18:2      PC 18:2_18:3        PC 33:1      
##  Min.   :1488540   Min.   :1019696   Min.   : 461853   Min.   : 68377  
##  1st Qu.:3604680   1st Qu.:2321393   1st Qu.:1184178   1st Qu.:126434  
##  Median :4648277   Median :2999829   Median :1668056   Median :202380  
##  Mean   :4866462   Mean   :3216453   Mean   :2042012   Mean   :270822  
##  3rd Qu.:5808426   3rd Qu.:4046349   3rd Qu.:2458012   3rd Qu.:388863  
##  Max.   :9507187   Max.   :7514764   Max.   :9041275   Max.   :818552  
##  NA's   :1         NA's   :1         NA's   :1         NA's   :1       
##     PC 37:4          PC 37:6          PC 38:5           PC 42:5     
##  Min.   : 63293   Min.   :  7100   Min.   : 404320   Min.   : 5997  
##  1st Qu.:162836   1st Qu.: 19874   1st Qu.: 883230   1st Qu.:11516  
##  Median :232040   Median : 32078   Median :1105558   Median :14404  
##  Mean   :255861   Mean   : 44276   Mean   :1336916   Mean   :17211  
##  3rd Qu.:323754   3rd Qu.: 59065   3rd Qu.:1656436   3rd Qu.:19586  
##  Max.   :578613   Max.   :187567   Max.   :4461148   Max.   :71058  
##  NA's   :1        NA's   :1        NA's   :1         NA's   :1      
##    SM 31:1;O2      SM 32:0;O2      SM 32:2;O2       SM 33:1;O2     
##  Min.   : 1870   Min.   : 8874   Min.   : 14141   Min.   :  80968  
##  1st Qu.: 5126   1st Qu.:14756   1st Qu.: 34933   1st Qu.: 131226  
##  Median : 8189   Median :20232   Median : 43581   Median : 205337  
##  Mean   :10319   Mean   :22508   Mean   : 47508   Mean   : 253856  
##  3rd Qu.:14038   3rd Qu.:26382   3rd Qu.: 53445   3rd Qu.: 349977  
##  Max.   :40518   Max.   :67361   Max.   :137008   Max.   :1159448  
##                                                                    
##    SM 35:2;O2      SM 36:0;O2       SM 36:2;O2        SM 38:1;O2     
##  Min.   : 1369   Min.   :  3114   Min.   :  66626   Min.   : 460835  
##  1st Qu.:10007   1st Qu.: 34042   1st Qu.: 415108   1st Qu.: 841360  
##  Median :14052   Median : 54051   Median : 530919   Median :1069719  
##  Mean   :17171   Mean   : 71728   Mean   : 552335   Mean   :1124277  
##  3rd Qu.:21498   3rd Qu.: 95960   3rd Qu.: 652391   3rd Qu.:1273362  
##  Max.   :50293   Max.   :257720   Max.   :1374190   Max.   :2868571  
##                                                                      
##    SM 39:1;O2        SM 41:1;O2        SM 43:1;O2       SM 43:2;O2    
##  Min.   :  99346   Min.   : 256254   Min.   :  1724   Min.   :   778  
##  1st Qu.: 252341   1st Qu.: 673751   1st Qu.:  6772   1st Qu.:  8331  
##  Median : 354352   Median : 883053   Median : 15300   Median : 26891  
##  Mean   : 375776   Mean   : 942721   Mean   : 30281   Mean   : 67052  
##  3rd Qu.: 470294   3rd Qu.:1086141   3rd Qu.: 52213   3rd Qu.:116769  
##  Max.   :1394489   Max.   :3269210   Max.   :174652   Max.   :551011  
##                                                                       
##  SM 43:2;O2 (2)   TG 12:0_14:0_18:1 TG 12:0_14:0_18:2 TG 12:0_16:0_18:1
##  Min.   :  1835   Min.   :   1876   Min.   :   409    Min.   :  33594  
##  1st Qu.: 19711   1st Qu.:  20948   1st Qu.:  8484    1st Qu.: 122528  
##  Median : 25718   Median :  43284   Median : 15514    Median : 231408  
##  Mean   : 29614   Mean   :  89110   Mean   : 37001    Mean   : 496108  
##  3rd Qu.: 37074   3rd Qu.:  74406   3rd Qu.: 30292    3rd Qu.: 538844  
##  Max.   :100293   Max.   :1654026   Max.   :436194    Max.   :8255016  
##                   NA's   :1         NA's   :1         NA's   :1        
##  TG 14:0_16:0_16:0 TG 14:0_16:0_18:1  TG 14:0_16:0_18:2 TG 15:0_16:0_18:2
##  Min.   :  48539   Min.   :  145440   Min.   :  73443   Min.   :  6736   
##  1st Qu.: 122201   1st Qu.:  405010   1st Qu.: 240898   1st Qu.: 32952   
##  Median : 183323   Median :  924980   Median : 450780   Median : 64756   
##  Mean   : 372234   Mean   : 1890534   Mean   : 801214   Mean   : 84639   
##  3rd Qu.: 297648   3rd Qu.: 1994748   3rd Qu.: 853793   3rd Qu.:107736   
##  Max.   :8103655   Max.   :25783827   Max.   :8505345   Max.   :447564   
##  NA's   :1         NA's   :1          NA's   :1         NA's   :1        
##  TG 15:0_18:1_18:2 TG 16:0_16:0_16:0  TG 16:0_16:0_18:0 TG 16:0_16:0_18:1 
##  Min.   : 19173    Min.   :   80850   Min.   :    895   Min.   :  568296  
##  1st Qu.:103764    1st Qu.:  242263   1st Qu.: 140629   1st Qu.: 1391434  
##  Median :163335    Median :  353924   Median : 230029   Median : 2871628  
##  Mean   :205923    Mean   :  758549   Mean   : 466810   Mean   : 5512771  
##  3rd Qu.:267908    3rd Qu.:  575325   3rd Qu.: 398531   3rd Qu.: 5459469  
##  Max.   :917622    Max.   :16911722   Max.   :9698771   Max.   :51858733  
##  NA's   :1         NA's   :1          NA's   :1         NA's   :1         
##  TG 16:0_16:0_18:3  TG 16:0_16:1_18:1  TG 16:0_17:0_18:1 TG 16:0_18:0_18:1 
##  Min.   :  327156   Min.   :     409   Min.   :   5158   Min.   :  129736  
##  1st Qu.: 1006376   1st Qu.:    1020   1st Qu.:  64266   1st Qu.:  412952  
##  Median : 1428453   Median : 1346120   Median : 113040   Median :  864658  
##  Mean   : 2033131   Mean   : 2438566   Mean   : 206451   Mean   : 1803588  
##  3rd Qu.: 2327405   3rd Qu.: 3015476   3rd Qu.: 237763   3rd Qu.: 1677357  
##  Max.   :11037737   Max.   :20318486   Max.   :1521967   Max.   :26906850  
##  NA's   :1          NA's   :1          NA's   :1         NA's   :1         
##  TG 16:0_18:1_18:1   TG 16:0_18:1_20:4 TG 16:0_18:1_22:6 TG 16:0_18:2_18:2 
##  Min.   :  2374489   Min.   :  96421   Min.   :  11646   Min.   :  696372  
##  1st Qu.: 12488182   1st Qu.: 452167   1st Qu.: 136276   1st Qu.: 3198294  
##  Median : 18730656   Median : 663608   Median : 233812   Median : 5820237  
##  Mean   : 24023077   Mean   : 904982   Mean   : 374257   Mean   : 6746779  
##  3rd Qu.: 30017131   3rd Qu.:1055853   3rd Qu.: 473502   3rd Qu.: 8895195  
##  Max.   :100351364   Max.   :7882434   Max.   :2709368   Max.   :30395809  
##  NA's   :1           NA's   :1         NA's   :1         NA's   :1         
##  TG 17:0_18:1_18:1 TG 18:0_18:1_20:4 TG 18:1_18:1_18:1  TG 18:1_18:1_18:2 
##  Min.   :  26308   Min.   : 31383    Min.   :     968   Min.   :  885360  
##  1st Qu.: 111388   1st Qu.:198427    1st Qu.: 3695216   1st Qu.: 4011158  
##  Median : 177911   Median :272420    Median : 6087724   Median : 6320904  
##  Mean   : 267196   Mean   :311115    Mean   : 6708887   Mean   : 7113549  
##  3rd Qu.: 344917   3rd Qu.:398255    3rd Qu.: 9064531   3rd Qu.: 8872944  
##  Max.   :1343802   Max.   :840640    Max.   :31454995   Max.   :23688940  
##  NA's   :1         NA's   :1         NA's   :1          NA's   :1         
##  TG 18:1_18:2_18:2  TG 18:1_18:2_18:3 TG 18:1_18:2_20:4 TG 18:2_18:2_18:3 
##  Min.   :  192759   Min.   :  44268   Min.   :  81731   Min.   :     465  
##  1st Qu.: 1674476   1st Qu.: 173718   1st Qu.: 259715   1st Qu.: 2581063  
##  Median : 3143740   Median : 263568   Median : 342258   Median : 6216556  
##  Mean   : 3647265   Mean   : 347198   Mean   : 391916   Mean   : 9808230  
##  3rd Qu.: 4888248   3rd Qu.: 393662   3rd Qu.: 490018   3rd Qu.:12368655  
##  Max.   :12998497   Max.   :3042072   Max.   :1140408   Max.   :76332111  
##  NA's   :1          NA's   :1         NA's   :1         NA's   :1         
##     TG 54:6       
##  Min.   :1229289  
##  1st Qu.:3100030  
##  Median :3862301  
##  Mean   :4111778  
##  3rd Qu.:5129100  
##  Max.   :7834942  
##  NA's   :1
data_lipids_validation[1:5, ]
##                 X2 ACar 16:0 ACar 18:1 ACar 18:2 CE 16:1 CE 20:3 CE 20:4
## X1_K295_VG   VEGAN     14647     34983     32387    1425    4776  146951
## X10_K285_VG  VEGAN     19415     74585     27229   13668   73153  585436
## X102_K227_VG VEGAN     16625     57087     34302    4176   26358  293179
## X103_K109_VG VEGAN     14978     33941     36238    8596   91581  396289
## X104_K154_OM  OMNI     40161     49472     30723   95977   24500  524349
##              CE 22:6 Cer 18:1_22:0;O2 Cer 18:1_23:0;O2 Cer 18:1_24:0;O2
## X1_K295_VG     53725            28237          1033217           104755
## X10_K285_VG    46305            38357          2105302           162863
## X102_K227_VG   31908            36793          1313395           119727
## X103_K109_VG   60209            17923           735377            50715
## X104_K154_OM   46589            71416          3796916           295896
##              Cer 18:1_24:1;O2 DG 16:0_18:1 LPC 18:2/0:0 LPC 20:1/0:0
## X1_K295_VG              21063         3832      2476079        31819
## X10_K285_VG             43543         7619      1504969        29195
## X102_K227_VG            33507         3883      2075177        27347
## X103_K109_VG            13662         3698      1548078        26995
## X104_K154_OM           104732        66420      1726049        24778
##              LPC 20:2/0:0 LPC 20:5/0:0 LPC 22:6/0:0 PC 12:0_16:0 PC 14:0_16:0
## X1_K295_VG          25166        70258        20266       622039       175998
## X10_K285_VG         14748        39723        21537       561863        56583
## X102_K227_VG        19000        16941        60333       631646       133915
## X103_K109_VG        28826        10868        28171       617534       132787
## X104_K154_OM        19492        76099       118825       736616      1249508
##              PC 14:0_17:0 PC 14:0_20:4 PC 14:0_22:6 PC 15:0_18:2 PC 15:0_20:3
## X1_K295_VG          20638        53463        72282       109237        26469
## X10_K285_VG         15860        60998        26165        90622        20287
## X102_K227_VG        20107        58472        24925       115434        27209
## X103_K109_VG        16878        79219        19541        46385        33717
## X104_K154_OM        72505       282014        80054        59607        74088
##              PC 15:0_20:4 PC 16:0_16:0 PC 16:0_16:1 PC 16:0_18:0 PC 16:0_18:1
## X1_K295_VG          23121      1215405       435342       236448     12421523
## X10_K285_VG         24466      1791860       361348       321667     39830133
## X102_K227_VG        42042      1376887       574364       317371      7805584
## X103_K109_VG        53092       438423       419486        90235      8155824
## X104_K154_OM       106079      3540018      7437691       533057     63183084
##              PC 16:0_20:3 (2) PC 16:0_20:5 PC 16:0_22:4 PC 16:0_22:6
## X1_K295_VG             236769      4036727       130956     12089854
## X10_K285_VG            633165      1401247       581455      8476924
## X102_K227_VG           112918      1091447       364299      7037314
## X103_K109_VG            87896       356035       528506      3138597
## X104_K154_OM           878156      5602999      1657386     16239034
##              PC 16:1_18:2 PC 17:0_18:1 PC 17:0_20:5 (2) PC 18:0_18:1
## X1_K295_VG         233024       107953            49140      2441509
## X10_K285_VG        359116       209815            27566      6391174
## X102_K227_VG       371169       203582            46425      4285476
## X103_K109_VG       186731       104871            16840       709957
## X104_K154_OM       396312       335586            27585      6912624
##              PC 18:0_20:3 PC 18:0_22:5 PC 18:0_22:6 PC 18:1_18:1 PC 18:1_18:2
## X1_K295_VG        1727886       572075      3402278      1932237     16797408
## X10_K285_VG       5954679       617417      2302757      5639709     13020436
## X102_K227_VG      2747968       985979      2687977      2371574     11930439
## X103_K109_VG      1896738       587657       854060      1974449      5454066
## X104_K154_OM      5965981      1612489      3692212      3511862      5577127
##              PC 18:1_20:3 PC 18:1_20:4 PC 18:2_18:2 PC 18:2_18:3 PC 33:1
## X1_K295_VG         368687      2126958      5171890      4192933   68377
## X10_K285_VG       1726138      1493010      2673530      1506650  108144
## X102_K227_VG      1104993      3116622      3174677      1370114  114466
## X103_K109_VG       300883      4601515      2627820       590448   84652
## X104_K154_OM      1362131      7868398      1019696      5905103  472028
##              PC 37:4 PC 37:6 PC 38:5 PC 42:5 SM 31:1;O2 SM 32:0;O2 SM 32:2;O2
## X1_K295_VG     87058   38538 2638370    7092       6094      11302      44885
## X10_K285_VG   120086   15463 1434728   16307       1870      19027      31350
## X102_K227_VG  192938   23474 1001460   15501       9251      35755      69787
## X103_K109_VG  207932   15369  493801   12004       5051      12469      30355
## X104_K154_OM  268926   46533 3059848   23065       8691      19279      35709
##              SM 33:1;O2 SM 35:2;O2 SM 36:0;O2 SM 36:2;O2 SM 38:1;O2 SM 39:1;O2
## X1_K295_VG       131226      11324      20461     391124     963210     214713
## X10_K285_VG      104341       7429      19081     436053     741696     296705
## X102_K227_VG     316250      30870     257720    1005156    2711728     577039
## X103_K109_VG     124345       8994      55215     300550     674354     181596
## X104_K154_OM     241605       1369     153133     551071    1202445     348010
##              SM 41:1;O2 SM 43:1;O2 SM 43:2;O2 SM 43:2;O2 (2) TG 12:0_14:0_18:1
## X1_K295_VG       572086       5470       6436          15831             47990
## X10_K285_VG     1037589       7242       7539          23550             39766
## X102_K227_VG    1929126      25442      27660          38162             11918
## X103_K109_VG     465715       5658       4699          10252             19896
## X104_K154_OM    1041722      57883     120691          37934           1621313
##              TG 12:0_14:0_18:2 TG 12:0_16:0_18:1 TG 14:0_16:0_16:0
## X1_K295_VG               15887             96852            111016
## X10_K285_VG               8250            129824            118584
## X102_K227_VG              4402             79693            171433
## X103_K109_VG              3799             55614            115838
## X104_K154_OM            324437           8255016           8103655
##              TG 14:0_16:0_18:1 TG 14:0_16:0_18:2 TG 15:0_16:0_18:2
## X1_K295_VG              198008            174483             37930
## X10_K285_VG             723094            386945             49987
## X102_K227_VG            277421            115991             13695
## X103_K109_VG            168435            208109             16166
## X104_K154_OM          25783827           8505345            447564
##              TG 15:0_18:1_18:2 TG 16:0_16:0_16:0 TG 16:0_16:0_18:0
## X1_K295_VG               47860            126332            306421
## X10_K285_VG             124073            345384            261565
## X102_K227_VG             60528            308281            190162
## X103_K109_VG            125198            351124            140640
## X104_K154_OM            459556          16911722           9698771
##              TG 16:0_16:0_18:1 TG 16:0_16:0_18:3 TG 16:0_16:1_18:1
## X1_K295_VG              568296            455878            246258
## X10_K285_VG            3158471           1422837           2399567
## X102_K227_VG           1735610            628693              1064
## X103_K109_VG           1136639           1058480              1188
## X104_K154_OM          51858733          11037737               582
##              TG 16:0_17:0_18:1 TG 16:0_18:0_18:1 TG 16:0_18:1_18:1
## X1_K295_VG                5158            129736           2374489
## X10_K285_VG             104382           1075187          32595424
## X102_K227_VG             51706           1160975          14057272
## X103_K109_VG             67208            315845           9215224
## X104_K154_OM           1258046          16678858          50531411
##              TG 16:0_18:1_20:4 TG 16:0_18:1_22:6 TG 16:0_18:2_18:2
## X1_K295_VG               96421            189399           3132284
## X10_K285_VG             686673            442709           6836239
## X102_K227_VG            369150            132592           3627649
## X103_K109_VG            437123             11646           7409714
## X104_K154_OM           7882434           2709368           9442621
##              TG 17:0_18:1_18:1 TG 18:0_18:1_20:4 TG 18:1_18:1_18:1
## X1_K295_VG               26308             31383           1411480
## X10_K285_VG             247014            456127          12276651
## X102_K227_VG            103626            178137           6026217
## X103_K109_VG            115695            116384           4611175
## X104_K154_OM            655511            745746           4312635
##              TG 18:1_18:1_18:2 TG 18:1_18:2_18:2 TG 18:1_18:2_18:3
## X1_K295_VG             3367530           3148300            194904
## X10_K285_VG            9052832           3245602            330485
## X102_K227_VG           5599498           2316630            281252
## X103_K109_VG           9092877           6337099            503167
## X104_K154_OM           2343773           2080054            352381
##              TG 18:1_18:2_20:4 TG 18:2_18:2_18:3 TG 54:6
## X1_K295_VG              149056           6867650 1229289
## X10_K285_VG             275157           4781620 3658599
## X102_K227_VG            307855           5281936 3614879
## X103_K109_VG            597006          24627503 2122661
## X104_K154_OM            742253           2486239 2760016
names(data_lipids_validation)
##  [1] "X2"                "ACar 16:0"         "ACar 18:1"        
##  [4] "ACar 18:2"         "CE 16:1"           "CE 20:3"          
##  [7] "CE 20:4"           "CE 22:6"           "Cer 18:1_22:0;O2" 
## [10] "Cer 18:1_23:0;O2"  "Cer 18:1_24:0;O2"  "Cer 18:1_24:1;O2" 
## [13] "DG 16:0_18:1"      "LPC 18:2/0:0"      "LPC 20:1/0:0"     
## [16] "LPC 20:2/0:0"      "LPC 20:5/0:0"      "LPC 22:6/0:0"     
## [19] "PC 12:0_16:0"      "PC 14:0_16:0"      "PC 14:0_17:0"     
## [22] "PC 14:0_20:4"      "PC 14:0_22:6"      "PC 15:0_18:2"     
## [25] "PC 15:0_20:3"      "PC 15:0_20:4"      "PC 16:0_16:0"     
## [28] "PC 16:0_16:1"      "PC 16:0_18:0"      "PC 16:0_18:1"     
## [31] "PC 16:0_20:3 (2)"  "PC 16:0_20:5"      "PC 16:0_22:4"     
## [34] "PC 16:0_22:6"      "PC 16:1_18:2"      "PC 17:0_18:1"     
## [37] "PC 17:0_20:5 (2)"  "PC 18:0_18:1"      "PC 18:0_20:3"     
## [40] "PC 18:0_22:5"      "PC 18:0_22:6"      "PC 18:1_18:1"     
## [43] "PC 18:1_18:2"      "PC 18:1_20:3"      "PC 18:1_20:4"     
## [46] "PC 18:2_18:2"      "PC 18:2_18:3"      "PC 33:1"          
## [49] "PC 37:4"           "PC 37:6"           "PC 38:5"          
## [52] "PC 42:5"           "SM 31:1;O2"        "SM 32:0;O2"       
## [55] "SM 32:2;O2"        "SM 33:1;O2"        "SM 35:2;O2"       
## [58] "SM 36:0;O2"        "SM 36:2;O2"        "SM 38:1;O2"       
## [61] "SM 39:1;O2"        "SM 41:1;O2"        "SM 43:1;O2"       
## [64] "SM 43:2;O2"        "SM 43:2;O2 (2)"    "TG 12:0_14:0_18:1"
## [67] "TG 12:0_14:0_18:2" "TG 12:0_16:0_18:1" "TG 14:0_16:0_16:0"
## [70] "TG 14:0_16:0_18:1" "TG 14:0_16:0_18:2" "TG 15:0_16:0_18:2"
## [73] "TG 15:0_18:1_18:2" "TG 16:0_16:0_16:0" "TG 16:0_16:0_18:0"
## [76] "TG 16:0_16:0_18:1" "TG 16:0_16:0_18:3" "TG 16:0_16:1_18:1"
## [79] "TG 16:0_17:0_18:1" "TG 16:0_18:0_18:1" "TG 16:0_18:1_18:1"
## [82] "TG 16:0_18:1_20:4" "TG 16:0_18:1_22:6" "TG 16:0_18:2_18:2"
## [85] "TG 17:0_18:1_18:1" "TG 18:0_18:1_20:4" "TG 18:1_18:1_18:1"
## [88] "TG 18:1_18:1_18:2" "TG 18:1_18:2_18:2" "TG 18:1_18:2_18:3"
## [91] "TG 18:1_18:2_20:4" "TG 18:2_18:2_18:3" "TG 54:6"

3.1.3 Merge training and validation dataset

Open code
common_lipids <- intersect(
  colnames(data_lipids_original), 
  colnames(data_lipids_validation))

tr1 <- data_lipids_original %>% 
  mutate(Data = if_else(Country == 'CZ', 'CZ_tr', 'IT_tr')) %>% 
  select(Data, Diet, all_of(common_lipids)) # %>% data.frame()

tr2 <- data_lipids_validation %>% 
  mutate(Data = 'valid',
         Diet = X2) %>% 
  select(Data, Diet, all_of(common_lipids)) # %>% data.frame()

## final merge of data
data_merged <- bind_rows(tr1, tr2)

3.2 Explore

3.2.0.1 Distributions - raw data

Open code
check <- data_lipids_original %>% 
  dplyr::select(
    `ACar 10:0`: `TG 18:1_18:1_20:4`
    ) %>% 
  na.omit() %>% data.frame(check.names = FALSE)


size <-  c(6, 8)
par(mfrow = c(size[1], size[2]))
par(mar=c(2, 1.5, 2, 0.5))

set.seed(478)
ran <- sample(1:ncol(check), size[1]*size[2], replace = FALSE)

for(x in ran){
  hist(check[,x], 
       16, 
       col= 'blue', 
       main = paste0(colnames(check)[x])
  )
}

Histogram of data distributions for random 48 lipids

Data seems to be highly right-tailed.

3.2.0.2 Distribution - Log2 transformed

Open code
par(mfrow = c(size[1],size[2]))
par(mar=c(2,1.5,2,0.5))
set.seed(478)

for(x in ran){
  hist(log2(check[,x]+1), 
       16, 
       col='blue', 
       main = paste0('log2',colnames(check)[x])
  )
}

Histogram of data distributions for random 48 lipids, but after log2-transformation

Seems more symmetrical and Gaussian-like

3.2.0.3 Comparison training vs validation cohort

Open code
data_merged <- data_merged %>% data.frame(check.names = FALSE) %>% na.omit()
check <- data_merged %>% select(-Data, -Diet) %>% data.frame(check.names = FALSE)


size = c(5,6)
par(mfrow = c(size[1],size[2]))
par(mar = c(2, 1.5, 2, 0.5))
par(mgp = c(3, 0.5, 0 ))

ran <- sample(ncol(check), size[1] * size[2])

for(x in ran){
  plot(log2(data_merged[, (x+2)] + 1) ~ factor(data_merged$Data),
       main = paste0(colnames(check)[x])
  )
}

Boxplot showing log2-transformed lipid levels across both training cohorts and also independent validation cohort

3.2.0.4 Lipids accross groups

Open code
colo <- c('#329243', '#F9FFAF')

outcomes <- sample(common_lipids, 30)

boxplot_cond <- function(variable) {
  
  
  p <- ggboxplot(data_merged, 
                 x = 'Diet', 
                 y = variable, 
                 fill = 'Diet', 
                 tip.length = 0.15,
                 palette = colo,
                 outlier.shape = 1,
                 lwd = 0.25,
                 outlier.size = 0.8,
                 facet.by = 'Data',
                 title = variable,
                 ylab = 'Lipid level') +
    
    theme(
      plot.title = element_text(size = 10), 
      axis.title = element_text(size = 8),  
      axis.text.y = element_text(size = 7),
      axis.text.x = element_blank(),
      axis.title.x = element_blank()
    ) 
    
  
  return(p)
}

# Plot all outcomes
plots <- map(outcomes, boxplot_cond)

# Create a matrix of plots
plots_arranged <- ggarrange(plotlist = plots, ncol = 5, nrow = 6,  common.legend = TRUE)
plots_arranged

Levels of lipids across all 3 cohorts (Czech and Italian training cohorts and an independent Czech valdiation cohort) and across dietary groups

Again, but with log2-transformation to better see group differences within validation cohort

Open code
colo <- c('#329243', '#F9FFAF')

outcomes <- sample(common_lipids, 30)

data_merged_log2 <- data_merged %>%
  mutate(across(all_of(common_lipids), ~ log2(. + 1)))

boxplot_cond <- function(variable) {
  
  
  p <- ggboxplot(data_merged_log2, 
                 x = 'Diet', 
                 y = variable, 
                 fill = 'Diet', 
                 tip.length = 0.15,
                 palette = colo,
                 outlier.shape = 1,
                 lwd = 0.25,
                 outlier.size = 0.8,
                 facet.by = 'Data',
                 title = variable,
                 ylab = 'log2(Lipid level)') +
    
    theme(
      plot.title = element_text(size = 10), 
      axis.title = element_text(size = 8),  
      axis.text.y = element_text(size = 7),
      axis.text.x = element_blank(),
      axis.title.x = element_blank()
    ) 

  return(p)
}

# Plot all outcomes
plots <- map(outcomes, boxplot_cond)

# Create a matrix of plots
plots_arranged <- ggarrange(plotlist = plots, ncol = 5, nrow = 6,  common.legend = TRUE)
plots_arranged

Log2-trasformed levels of lipids across all 3 cohorts (Czech and Italian training cohorts and an independent Czech valdiation cohort) and across dietary groups

4 Linear models across lipids

we will fit a feature-specific linear model where the log2-transformed lipid represents the outcome variable whereas country (Italy vs Czech), diet (vegan vs omnivore), and their interaction (country:diet) all represent fixed-effects predictors. So, each model has the following form

\[ log_{2}(\text{lipid level}) = \alpha + \beta_{1} \times \text{country} + \beta_{2} \times \text{diet} + \beta_{3} \times \text{country:diet} + \epsilon \]

The variables were coded as follows: \(diet = -0.5\) for omnivores and \(diet = 0.5\) for vegans; \(country = -0.5\) for the Czech cohort and \(country = 0.5\) for the Italian cohort.
This parameterization allows us to interpret the linear model summary output as presenting the conditional effects of diet averaged across both countries and the conditional effects of country averaged across both diet groups. We will then use the emmeans package (Lenth 2024) to obtain specific estimates for the effect of diet in the Italian and Czech cohorts separately, still from a single model.

Lipids that will show a significant diet effect (average effect of diet across both countries, adjusted for multiple comparisons with FDR < 0.05) will be then visualized using a forest plot, with country-specific diet effect along with diet effect based on independent validation cohort, to evaluate how generalizable these findings are.

Given the distribution of the estimated lipids concentrations, we will use log2-transformed values

Note that p-value for avg effects are the same as produced with car::Anova(model, type = 'III').

We will run the models in two versions: the first will include all lipids, and the second will include only lipids available in the validation cohort (i.e., only those for which the association with diet can be validated in the external cohort).

4.1 Preparation

4.1.1 Define transformation function for each dataset

Open code
trans_lipid <- function(x){
  log2(x + 1)
}

4.1.2 Select data - all lipids

Open code
data_analysis <- data_lipids_original %>%
  na.omit() %>%
  dplyr::mutate(
    Diet_VEGAN = as.numeric(
      dplyr::if_else(
        Diet == "VEGAN", 0.5, -0.5
      )
    ),
    Country_IT = as.numeric(
      dplyr::if_else(
        Country == "IT", 0.5, -0.5
      )
    ),
    dplyr::across(
      `ACar 10:0`:`TG 18:1_18:1_20:4`, ~ trans_lipid(.)
    )
  ) %>%
  dplyr::select(
    Sample,
    Country,
    Country_IT,
    Diet,
    Diet_VEGAN,
    Group,
    dplyr::everything()
  ) %>% data.frame(check.names = FALSE)

summary(data_analysis[ , 1:12])
##     Sample            Country            Country_IT         Diet          
##  Length:160         Length:160         Min.   :-0.500   Length:160        
##  Class :character   Class :character   1st Qu.:-0.500   Class :character  
##  Mode  :character   Mode  :character   Median :-0.500   Mode  :character  
##                                        Mean   :-0.025                     
##                                        3rd Qu.: 0.500                     
##                                        Max.   : 0.500                     
##    Diet_VEGAN         Group             ACar 10:0       ACar 18:1    
##  Min.   :-0.5000   Length:160         Min.   :15.25   Min.   :16.08  
##  1st Qu.:-0.5000   Class :character   1st Qu.:16.89   1st Qu.:18.89  
##  Median : 0.5000   Mode  :character   Median :17.49   Median :19.21  
##  Mean   : 0.0625                      Mean   :17.49   Mean   :19.19  
##  3rd Qu.: 0.5000                      3rd Qu.:17.99   3rd Qu.:19.51  
##  Max.   : 0.5000                      Max.   :19.47   Max.   :20.25  
##    ACar 18:2        CE 16:0         CE 16:1         CE 18:1     
##  Min.   :16.53   Min.   :20.87   Min.   :17.31   Min.   :23.56  
##  1st Qu.:17.42   1st Qu.:21.37   1st Qu.:19.17   1st Qu.:24.58  
##  Median :18.01   Median :21.54   Median :19.95   Median :24.79  
##  Mean   :17.98   Mean   :21.58   Mean   :19.98   Mean   :24.76  
##  3rd Qu.:18.50   3rd Qu.:21.81   3rd Qu.:20.69   3rd Qu.:24.99  
##  Max.   :19.42   Max.   :22.42   Max.   :22.77   Max.   :25.64

4.1.3 Select data - training-validation intersection

Open code
data_analysis_narrowed <- data_analysis %>% 
  dplyr::select(
    Sample, Country, Country_IT, Diet, Diet_VEGAN, Group, 
    dplyr::all_of(
      intersect(
        colnames(
          data_lipids_validation
          ), colnames(
            data_lipids_original
            )
        )
      )
    )

4.1.4 Define number of lipids and covariates

Open code
n_covarites <- 6
n_features <- ncol(data_analysis) - n_covarites

4.2 Run - all lipids

4.2.1 Create empty objects

Open code
outcome <- vector('double', n_features)
log2FD_VGdiet_inCZ <- vector('double', n_features)
log2FD_VGdiet_inIT <- vector('double', n_features)
log2FD_VGdiet_avg <- vector('double', n_features)

log2FD_ITcountry_avg <- vector('double', n_features)
diet_country_int <- vector('double', n_features)


P_VGdiet_inCZ <- vector('double', n_features)
P_VGdiet_inIT <- vector('double', n_features)
P_VGdiet_avg <- vector('double', n_features)

P_ITcountry_avg <- vector('double', n_features)
P_diet_country_int <- vector('double', n_features)


CI_L_VGdiet_inCZ <- vector('double', n_features)
CI_L_VGdiet_inIT <- vector('double', n_features)
CI_L_VGdiet_avg <- vector('double', n_features)

CI_U_VGdiet_inCZ <- vector('double', n_features)
CI_U_VGdiet_inIT <- vector('double', n_features)
CI_U_VGdiet_avg <- vector('double', n_features)

4.2.2 Estimate over outcomes

Open code
for (i in 1:n_features) {
  
  ## define variable
  data_analysis$outcome <- data_analysis[, (i + n_covarites)]

  ## fit model
  model <- lm(outcome ~ Country_IT * Diet_VEGAN, data = data_analysis)

  ## get contrast (effects of diet BY COUNTRY)
  contrast_emm <- summary(
    pairs(
      emmeans(
        model,
        specs = ~ Diet_VEGAN | Country_IT
        ),
      interaction = TRUE,
      adjust = "none"
      ),
    infer = c(TRUE, TRUE)
    )

  ## save results
  outcome[i] <- names(data_analysis)[i + n_covarites]
  
  ## country effect
  log2FD_ITcountry_avg[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Country_IT"
    ), 1
  ]

  P_ITcountry_avg[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Country_IT"
    ), 4
  ]
  
  ## diet effect
  tr <- confint(model)
  
  CI_L_VGdiet_avg[i] <- tr[which(row.names(tr) == 'Diet_VEGAN'),][1]
  CI_U_VGdiet_avg[i] <- tr[which(row.names(tr) == 'Diet_VEGAN'),][2]
  
  log2FD_VGdiet_avg[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Diet_VEGAN"
    ), 1
  ]

  P_VGdiet_avg[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Diet_VEGAN"
    ), 4
  ]
  
  log2FD_VGdiet_inCZ[i] <- -contrast_emm[1,3]
  P_VGdiet_inCZ[i] <- contrast_emm$p.value[1]
  CI_L_VGdiet_inCZ[i] <- -contrast_emm$upper.CL[1]
  CI_U_VGdiet_inCZ[i] <- -contrast_emm$lower.CL[1]
  
  log2FD_VGdiet_inIT[i] <- -contrast_emm[2,3]
  P_VGdiet_inIT[i] <- contrast_emm$p.value[2]
  CI_L_VGdiet_inIT[i] <- -contrast_emm$upper.CL[2]
  CI_U_VGdiet_inIT[i] <- -contrast_emm$lower.CL[2]
  
  ## interaction
  diet_country_int[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Country_IT:Diet_VEGAN"
    ), 1
  ]

  P_diet_country_int[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Country_IT:Diet_VEGAN"
    ), 4
  ]
}

4.2.3 Results table

Open code
result_lipidom <- data.frame(
  outcome,
  log2FD_ITcountry_avg, P_ITcountry_avg,
  log2FD_VGdiet_avg, P_VGdiet_avg,
  log2FD_VGdiet_inCZ, P_VGdiet_inCZ,
  log2FD_VGdiet_inIT, P_VGdiet_inIT,
  diet_country_int, P_diet_country_int,
  CI_L_VGdiet_avg, CI_U_VGdiet_avg,
  CI_L_VGdiet_inCZ, CI_U_VGdiet_inCZ,
  CI_L_VGdiet_inIT, CI_U_VGdiet_inIT
)

4.2.4 Adjust p values

Open code
result_lipidom <- result_lipidom %>% 
  dplyr::mutate(
    fdr_ITcountry_avg = p.adjust(P_ITcountry_avg, method = 'BH'),
    fdr_VGdiet_avg = p.adjust(P_VGdiet_avg, method = 'BH'),
    fdr_VGdiet_inCZ = p.adjust(P_VGdiet_inCZ, method = 'BH'),
    fdr_VGdiet_inIT = p.adjust(P_VGdiet_inIT, method = 'BH'),
    fdr_diet_country_int = p.adjust(P_diet_country_int, method = 'BH')
  ) %>% 
  dplyr::select(
    outcome,
    log2FD_ITcountry_avg, P_ITcountry_avg, fdr_ITcountry_avg,
    log2FD_VGdiet_avg, P_VGdiet_avg, fdr_VGdiet_avg,
    log2FD_VGdiet_inCZ, P_VGdiet_inCZ, fdr_VGdiet_inCZ,
    log2FD_VGdiet_inIT, P_VGdiet_inIT, fdr_VGdiet_inIT,
    diet_country_int, P_diet_country_int, fdr_diet_country_int,
    CI_L_VGdiet_avg, CI_U_VGdiet_avg,
    CI_L_VGdiet_inCZ, CI_U_VGdiet_inCZ,
    CI_L_VGdiet_inIT, CI_U_VGdiet_inIT
  )

4.2.5 Show and save results

Open code
kableExtra::kable(result_lipidom %>% filter(fdr_VGdiet_avg < 0.05),
  caption = "Result of linear models, modelling the log2-transformed level of given lipid, with `Diet`, `Country` and `Diet:Country` interaction as predictors. Only the lipids that differed significantly between diets are shown (FDR<0.05, average effect over both coutnries). `log2FD` prefix: implies estimated effects (regression coefficient), i.e. how much log2-transformed lipid level differ in vegans compared to omnivores, `P`: p-value, `fdr`: p-value after adjustment for multiple comparison, `CI_L` and `CI_U`: lower and upper bounds of 95% confidence interval respectively. `avg` suffix shows effect averaged across subgroups, whereas `inCZ` and `inIT` shows effect in Czech or Italian cohort respectively. All estimates in a single row are based on a single model"
)
Result of linear models, modelling the log2-transformed level of given lipid, with Diet, Country and Diet:Country interaction as predictors. Only the lipids that differed significantly between diets are shown (FDR<0.05, average effect over both coutnries). log2FD prefix: implies estimated effects (regression coefficient), i.e. how much log2-transformed lipid level differ in vegans compared to omnivores, P: p-value, fdr: p-value after adjustment for multiple comparison, CI_L and CI_U: lower and upper bounds of 95% confidence interval respectively. avg suffix shows effect averaged across subgroups, whereas inCZ and inIT shows effect in Czech or Italian cohort respectively. All estimates in a single row are based on a single model
outcome log2FD_ITcountry_avg P_ITcountry_avg fdr_ITcountry_avg log2FD_VGdiet_avg P_VGdiet_avg fdr_VGdiet_avg log2FD_VGdiet_inCZ P_VGdiet_inCZ fdr_VGdiet_inCZ log2FD_VGdiet_inIT P_VGdiet_inIT fdr_VGdiet_inIT diet_country_int P_diet_country_int fdr_diet_country_int CI_L_VGdiet_avg CI_U_VGdiet_avg CI_L_VGdiet_inCZ CI_U_VGdiet_inCZ CI_L_VGdiet_inIT CI_U_VGdiet_inIT
ACar 18:1 0.2608033 0.0012225 0.0018337 0.2998231 0.0002173 0.0003622 0.1396406 0.2122055 0.2483256 0.4600057 0.0000689 0.0001960 0.3203651 0.0447693 0.0889991 0.1434272 0.4562191 -0.0805558 0.3598370 0.2378519 0.6821594
ACar 18:2 -0.1759630 0.0263467 0.0342300 0.8958953 0.0000000 0.0000000 0.9005994 0.0000000 0.0000000 0.8911912 0.0000000 0.0000000 -0.0094082 0.9522750 0.9575442 0.7408912 1.0508994 0.6823626 1.1188362 0.6710145 1.1113680
CE 16:0 -0.3408761 0.0000000 0.0000000 -0.2623968 0.0000000 0.0000000 -0.4464875 0.0000000 0.0000000 -0.0783061 0.1611826 0.2216261 0.3681813 0.0000056 0.0000466 -0.3397467 -0.1850469 -0.5553917 -0.3375833 -0.1881784 0.0315661
CE 16:1 -0.1140907 0.3730151 0.4244654 -1.3451145 0.0000000 0.0000000 -1.6639735 0.0000000 0.0000000 -1.0262555 0.0000001 0.0000004 0.6377180 0.0135675 0.0339892 -1.5973643 -1.0928646 -2.0191267 -1.3088203 -1.3845656 -0.6679453
CE 18:1 -0.0274425 0.5541491 0.5976118 -0.1830351 0.0001162 0.0002034 -0.3941980 0.0000000 0.0000000 0.0281278 0.6694021 0.7565161 0.4223258 0.0000102 0.0000719 -0.2744713 -0.0915989 -0.5229349 -0.2654610 -0.1017535 0.1580091
CE 20:3 0.6441380 0.0000000 0.0000000 -0.2127769 0.0143419 0.0198858 -0.3333936 0.0065514 0.0097831 -0.0921602 0.4513329 0.5684728 0.2412334 0.1623792 0.2435395 -0.3825021 -0.0430517 -0.5723569 -0.0944304 -0.3332476 0.1489272
CE 20:4 1.0731406 0.0000000 0.0000000 -0.2476516 0.0057704 0.0082079 -0.4937811 0.0001119 0.0002337 -0.0015221 0.9903519 0.9905818 0.4922590 0.0060698 0.0175704 -0.4224109 -0.0728923 -0.7398320 -0.2477301 -0.2497602 0.2467160
CE 22:6 1.7378429 0.0000000 0.0000000 -0.9393940 0.0000000 0.0000000 -0.7465059 0.0000435 0.0000957 -1.1322821 0.0000000 0.0000000 -0.3857762 0.1279229 0.2029546 -1.1883414 -0.6904465 -1.0970095 -0.3960023 -1.4859013 -0.7786628
Cer 18:1_22:0;O2 0.1739003 0.0195285 0.0257911 -0.4777728 0.0000000 0.0000000 -0.5640303 0.0000002 0.0000006 -0.3915152 0.0002580 0.0005995 0.1725150 0.2436086 0.3349618 -0.6233448 -0.3322008 -0.7689872 -0.3590733 -0.5982941 -0.1847364
Cer 18:1_23:0;O2 0.1102785 0.1182713 0.1456326 -0.6312541 0.0000000 0.0000000 -0.8660629 0.0000000 0.0000000 -0.3964452 0.0001072 0.0002765 0.4696177 0.0010326 0.0039623 -0.7699359 -0.4925723 -1.0613189 -0.6708070 -0.5934368 -0.1994537
Cer 18:1_24:1;O2 0.0452716 0.5257106 0.5782816 -0.4067465 0.0000001 0.0000001 -0.5801159 0.0000000 0.0000001 -0.2333770 0.0223059 0.0360831 0.3467390 0.0159948 0.0377020 -0.5473517 -0.2661412 -0.7780799 -0.3821519 -0.4331007 -0.0336532
Cer 18:1_24:0;O2 0.2121668 0.0031127 0.0044275 -0.1691251 0.0178553 0.0245511 -0.2789948 0.0056738 0.0085888 -0.0592553 0.5557222 0.6439126 0.2197395 0.1219254 0.1972323 -0.3086728 -0.0295773 -0.4754700 -0.0825196 -0.2574770 0.1389664
LPC 0:0/16:0 -0.1854718 0.0001368 0.0002280 -0.1512690 0.0017210 0.0026051 -0.4608411 0.0000000 0.0000000 0.1583030 0.0200219 0.0327091 0.6191441 0.0000000 0.0000000 -0.2449413 -0.0575967 -0.5927263 -0.3289559 0.0252455 0.2913605
LPC 0:0/18:1 0.2146033 0.0021940 0.0031479 0.2343834 0.0008516 0.0013253 -0.0834851 0.3908276 0.4214808 0.5522519 0.0000001 0.0000004 0.6357370 0.0000082 0.0000646 0.0982711 0.3704958 -0.2751234 0.1081532 0.3589101 0.7455937
LPC 0:0/18:2 0.1781399 0.0186236 0.0251877 0.3284241 0.0000213 0.0000409 0.1454325 0.1699266 0.2017115 0.5114156 0.0000036 0.0000132 0.3659830 0.0156967 0.0375356 0.1804444 0.4764038 -0.0629143 0.3537794 0.3012167 0.7216144
LPC 15:0/0:0 -0.4902595 0.0000000 0.0000000 -0.9948191 0.0000000 0.0000000 -1.3276248 0.0000000 0.0000000 -0.6620133 0.0000000 0.0000000 0.6656114 0.0000091 0.0000686 -1.1381096 -0.8515285 -1.5293695 -1.1258800 -0.8655514 -0.4584753
LPC 16:0/0:0 -0.2855116 0.0000000 0.0000000 -0.1349736 0.0015015 0.0022940 -0.3822080 0.0000000 0.0000000 0.1122608 0.0603117 0.0896525 0.4944688 0.0000000 0.0000004 -0.2174736 -0.0524737 -0.4983632 -0.2660528 -0.0049270 0.2294485
LPC 16:1/0:0 -0.1084396 0.1657039 0.2010379 -0.2781652 0.0004708 0.0007518 -0.6329101 0.0000000 0.0000001 0.0765797 0.4897296 0.5941572 0.7094898 0.0000105 0.0000719 -0.4319711 -0.1243594 -0.8494599 -0.4163604 -0.1418949 0.2950543
LPC 17:0/0:0 -0.4297227 0.0000000 0.0000000 -0.3215485 0.0000006 0.0000014 -0.6752198 0.0000000 0.0000000 0.0321227 0.7152427 0.7920473 0.7073425 0.0000001 0.0000009 -0.4437685 -0.1993285 -0.8472985 -0.5031411 -0.1414855 0.2057310
LPC 18:1/0:0 0.1688917 0.0269697 0.0347656 0.2842639 0.0002412 0.0003979 0.0958470 0.3694647 0.4091388 0.4726808 0.0000200 0.0000622 0.3768338 0.0137780 0.0339892 0.1348666 0.4336612 -0.1144957 0.3061897 0.2604683 0.6848933
LPC 18:2/0:0 0.0453058 0.5123547 0.5738636 0.2726641 0.0001171 0.0002034 0.1366954 0.1613454 0.1943211 0.4086329 0.0000504 0.0001486 0.2719376 0.0505184 0.0969249 0.1363845 0.4089438 -0.0551785 0.3285692 0.2150535 0.6022123
LPC 20:1/0:0 -0.1633211 0.0235411 0.0308276 0.5742817 0.0000000 0.0000000 0.3410640 0.0008789 0.0016480 0.8074995 0.0000000 0.0000000 0.4664355 0.0013422 0.0049214 0.4332202 0.7153433 0.1424575 0.5396704 0.6071276 1.0078714
LPC 20:5/0:0 0.1338801 0.1467344 0.1793420 0.3994660 0.0000243 0.0000462 0.2071146 0.1110719 0.1398997 0.5918175 0.0000112 0.0000373 0.3847030 0.0377524 0.0806463 0.2181389 0.5807932 -0.0481836 0.4624127 0.3342500 0.8493851
LPC 22:6/0:0 -0.0606988 0.5529415 0.5976118 -0.6858047 0.0000000 0.0000000 -0.6399541 0.0000161 0.0000373 -0.7316554 0.0000012 0.0000050 -0.0917013 0.6539225 0.7441187 -0.8874331 -0.4841764 -0.9238351 -0.3560731 -1.0180598 -0.4452509
PC 14:0_16:0 -0.6734103 0.0000000 0.0000000 -0.8085154 0.0000000 0.0000000 -0.7269851 0.0000002 0.0000006 -0.8900457 0.0000000 0.0000000 -0.1630606 0.3930921 0.4876706 -0.9965659 -0.6204649 -0.9917493 -0.4622208 -1.1571634 -0.6229279
PC 14:0_20:4 0.6841718 0.0000020 0.0000039 -0.3025840 0.0304554 0.0405253 -0.2803751 0.1526221 0.1879301 -0.3247930 0.1008760 0.1434874 -0.0444178 0.8728519 0.9173284 -0.5762516 -0.0289165 -0.6656831 0.1049329 -0.7135260 0.0639401
PC 15:0_18:2 0.0492171 0.5147383 0.5738636 -0.6813049 0.0000000 0.0000000 -0.8859663 0.0000000 0.0000000 -0.4766434 0.0000161 0.0000512 0.4093230 0.0073689 0.0196109 -0.8301912 -0.5324185 -1.0955897 -0.6763430 -0.6881301 -0.2651567
PC 15:1_18:1 -0.2501451 0.0000316 0.0000561 -0.2376845 0.0000735 0.0001305 -0.5260364 0.0000000 0.0000000 0.0506674 0.5418969 0.6386643 0.5767039 0.0000020 0.0000204 -0.3529458 -0.1224232 -0.6883176 -0.3637552 -0.1130563 0.2143911
PC 16:0_16:0 0.1073072 0.0048297 0.0067535 -0.1719398 0.0000094 0.0000187 -0.3064757 0.0000000 0.0000001 -0.0374039 0.4839745 0.5941572 0.2690718 0.0004510 0.0019080 -0.2460758 -0.0978037 -0.4108549 -0.2020964 -0.1427110 0.0679032
PC 16:0_16:1 0.0226561 0.8060423 0.8364590 -0.7121891 0.0000000 0.0000000 -0.8719703 0.0000000 0.0000000 -0.5524079 0.0000410 0.0001254 0.3195624 0.0847929 0.1442353 -0.8941446 -0.5302336 -1.1281531 -0.6157875 -0.8108679 -0.2939478
PC 16:0_18:0 0.1968568 0.0001996 0.0003261 -0.2902152 0.0000001 0.0000002 -0.4405993 0.0000000 0.0000000 -0.1398312 0.0585960 0.0878940 0.3007681 0.0041373 0.0131279 -0.3922784 -0.1881520 -0.5842983 -0.2969002 -0.2848076 0.0051452
PC 16:0_18:1 0.2015973 0.0000007 0.0000015 -0.2447824 0.0000000 0.0000000 -0.4100626 0.0000000 0.0000000 -0.0795021 0.1537823 0.2150346 0.3305604 0.0000393 0.0002495 -0.3219177 -0.1676470 -0.5186647 -0.3014605 -0.1890696 0.0300653
PC 16:0_20:3 -3.6827067 0.0000000 0.0000000 -0.5355220 0.0000002 0.0000005 -0.4106613 0.0035518 0.0056480 -0.6603827 0.0000052 0.0000188 -0.2497214 0.2069300 0.2968995 -0.7301343 -0.3409097 -0.6846642 -0.1366585 -0.9368212 -0.3839442
PC 16:0_20:3 (2) 5.4191872 0.0000000 0.0000000 -0.8710277 0.0000000 0.0000000 -1.5130663 0.0000000 0.0000000 -0.2289891 0.1331166 0.1877286 1.2840772 0.0000000 0.0000003 -1.0819375 -0.6601179 -1.8100151 -1.2161175 -0.5285775 0.0705993
PC 16:0_20:4 -3.8469010 0.0000000 0.0000000 -0.3239307 0.0003944 0.0006381 -0.2203381 0.0820847 0.1058123 -0.4275232 0.0009615 0.0020340 -0.2071851 0.2484680 0.3388200 -0.5005741 -0.1472873 -0.4690418 0.0283655 -0.6784376 -0.1766088
PC 16:0_20:4 (2) 2.6062613 0.0000000 0.0000000 -0.2623178 0.0000037 0.0000076 -0.5492321 0.0000000 0.0000000 0.0245966 0.7519073 0.8114987 0.5738287 0.0000005 0.0000068 -0.3703246 -0.1543110 -0.7012995 -0.3971648 -0.1288226 0.1780157
PC 16:0_20:5 0.4752677 0.0002082 0.0003368 -0.7165998 0.0000001 0.0000001 -0.5473985 0.0022439 0.0037024 -0.8858012 0.0000016 0.0000063 -0.3384027 0.1782406 0.2625866 -0.9637525 -0.4694472 -0.8953751 -0.1994218 -1.2368710 -0.5347314
PC 16:0_22:4 1.2297374 0.0000000 0.0000000 -0.1887850 0.0327772 0.0432660 -0.3497438 0.0052013 0.0080964 -0.0278261 0.8234305 0.8545033 0.3219177 0.0681883 0.1209792 -0.3619085 -0.0156614 -0.5934918 -0.1059959 -0.2737407 0.2180885
PC 16:0_22:6 0.6839676 0.0000000 0.0000000 -0.5175854 0.0000000 0.0000000 -0.4040879 0.0000410 0.0000915 -0.6310828 0.0000000 0.0000000 -0.2269948 0.0970291 0.1600980 -0.6518732 -0.3832975 -0.5931575 -0.2150184 -0.8218330 -0.4403326
PC 16:1_18:2 0.3025899 0.0000864 0.0001501 0.4535819 0.0000000 0.0000000 0.3415782 0.0014982 0.0026581 0.5655856 0.0000004 0.0000017 0.2240074 0.1376507 0.2163082 0.3053238 0.6018399 0.1328394 0.5503169 0.3549913 0.7761798
PC 17:0_18:1 0.8251383 0.0000000 0.0000000 -0.7887386 0.0000000 0.0000000 -0.8805693 0.0000000 0.0000000 -0.6969080 0.0000000 0.0000000 0.1836613 0.1638356 0.2435395 -0.9184085 -0.6590687 -1.0631369 -0.6980016 -0.8810985 -0.5127175
PC 17:0_18:2 -1.3706790 0.0000000 0.0000000 -0.9746935 0.0000000 0.0000000 -0.2708014 0.0235266 0.0326209 -1.6785856 0.0000000 0.0000000 -1.4077842 0.0000000 0.0000000 -1.1407999 -0.8085871 -0.5046696 -0.0369332 -1.9145327 -1.4426385
PC 17:0_18:2 (2) 2.2172391 0.0000000 0.0000000 -1.2632147 0.0000000 0.0000000 -2.5624222 0.0000000 0.0000000 0.0359928 0.7567396 0.8114987 2.5984150 0.0000000 0.0000000 -1.4245103 -1.1019190 -2.7895171 -2.3353272 -0.1931208 0.2651065
PC 17:0_20:3 -1.0240799 0.0000000 0.0000000 -0.6662563 0.0000000 0.0000000 -0.5016866 0.0000123 0.0000291 -0.8308259 0.0000000 0.0000000 -0.3291394 0.0386125 0.0806463 -0.8220966 -0.5104159 -0.7211008 -0.2822724 -1.0521905 -0.6094614
PC 18:0_18:1 0.3398991 0.0000000 0.0000000 -0.2394262 0.0000148 0.0000286 -0.4438558 0.0000000 0.0000001 -0.0349965 0.6459225 0.7350153 0.4088593 0.0001926 0.0009929 -0.3451470 -0.1337053 -0.5927046 -0.2950070 -0.1851685 0.1151754
PC 18:0_22:5 0.7093392 0.0000000 0.0000000 0.2626571 0.0004738 0.0007518 0.2727778 0.0092953 0.0135728 0.2525364 0.0168104 0.0283033 -0.0202414 0.8907485 0.9243617 0.1173521 0.4079621 0.0681967 0.4773588 0.0461368 0.4589359
PC 18:0_22:6 1.0581591 0.0000000 0.0000000 -0.5490905 0.0000000 0.0000000 -0.3877502 0.0027743 0.0045322 -0.7104309 0.0000001 0.0000007 -0.3226807 0.0768573 0.1334889 -0.7280306 -0.3701505 -0.6396875 -0.1358130 -0.9646076 -0.4562541
PC 18:1_18:2 0.2109613 0.0000261 0.0000469 0.5520328 0.0000000 0.0000000 0.5039490 0.0000000 0.0000000 0.6001166 0.0000000 0.0000000 0.0961676 0.3247535 0.4225977 0.4558857 0.6481798 0.3685795 0.6393185 0.4635438 0.7366894
PC 18:1_20:3 1.0367053 0.0000000 0.0000000 0.4469125 0.0000005 0.0000011 0.4948140 0.0000579 0.0001241 0.3990109 0.0011798 0.0024641 -0.0958032 0.5738827 0.6668355 0.2790079 0.6148170 0.2584141 0.7312140 0.1605096 0.6375122
PC 18:1_20:4 0.6341276 0.0000000 0.0000000 0.2003139 0.0001843 0.0003135 0.0968305 0.1902939 0.2242749 0.3037972 0.0000687 0.0001960 0.2069668 0.0495415 0.0961688 0.0970405 0.3035872 -0.0485724 0.2422333 0.1571019 0.4504926
PC 18:2_18:2 0.4161300 0.0000000 0.0000001 0.4902017 0.0000000 0.0000000 0.5141575 0.0000012 0.0000032 0.4662459 0.0000113 0.0000373 -0.0479116 0.7409678 0.8150645 0.3473114 0.6330919 0.3129763 0.7153386 0.2632764 0.6692154
PC 18:2_18:3 0.2693107 0.0384234 0.0491462 1.1930357 0.0000000 0.0000000 1.3468692 0.0000000 0.0000000 1.0392022 0.0000001 0.0000004 -0.3076669 0.2348031 0.3283264 0.9382618 1.4478096 0.9881623 1.7055760 0.6773068 1.4010976
PC 18:2_20:4 0.9674236 0.0000000 0.0000000 0.2256828 0.0026583 0.0039162 0.0843653 0.4187184 0.4457324 0.3670002 0.0006152 0.0013535 0.2826349 0.0576864 0.1094052 0.0797012 0.3716644 -0.1211683 0.2898990 0.1596396 0.5743609
PC 37:6 0.9572387 0.0000000 0.0000000 -1.5008639 0.0000000 0.0000000 -1.3776541 0.0000000 0.0000000 -1.6240736 0.0000000 0.0000000 -0.2464195 0.2997851 0.3989076 -1.7347983 -1.2669294 -1.7070203 -1.0482879 -1.9563676 -1.2917797
SM 30:1;O2 -0.5167814 0.0001184 0.0001993 -0.5348944 0.0000696 0.0001247 -0.3739918 0.0440613 0.0605843 -0.6957970 0.0002549 0.0005995 -0.3218052 0.2206915 0.3139147 -0.7933722 -0.2764166 -0.7379136 -0.0100701 -1.0629536 -0.3286403
SM 32:0;O2 -0.3856184 0.0000251 0.0000454 -0.7468996 0.0000000 0.0000000 -0.7209840 0.0000000 0.0000001 -0.7728151 0.0000000 0.0000000 -0.0518311 0.7706964 0.8311432 -0.9222273 -0.5715718 -0.9678353 -0.4741327 -1.0218606 -0.5237696
SM 32:2;O2 -0.0971652 0.2530543 0.2979789 -0.4263996 0.0000013 0.0000029 -0.4159114 0.0006331 0.0012289 -0.4368879 0.0003819 0.0008751 -0.0209765 0.9016077 0.9297830 -0.5937016 -0.2590977 -0.6514628 -0.1803599 -0.6745332 -0.1992426
SM 33:1;O2 0.0592394 0.2756835 0.3187205 -1.1162588 0.0000000 0.0000000 -1.3544274 0.0000000 0.0000000 -0.8780901 0.0000000 0.0000000 0.4763372 0.0000201 0.0001329 -1.2232287 -1.0092888 -1.5050349 -1.2038198 -1.0300364 -0.7261438
SM 34:1;O2 0.0578330 0.0587033 0.0739393 -0.1115332 0.0003293 0.0005380 -0.2591626 0.0000000 0.0000000 0.0360961 0.4040008 0.5207823 0.2952587 0.0000028 0.0000259 -0.1715200 -0.0515465 -0.3436204 -0.1747047 -0.0491125 0.1213048
SM 34:2;O2 0.2010479 0.0000056 0.0000104 -0.1094614 0.0113851 0.0159198 -0.3193246 0.0000004 0.0000010 0.1004018 0.1001928 0.1434874 0.4197264 0.0000023 0.0000221 -0.1938878 -0.0250350 -0.4381921 -0.2004571 -0.0195224 0.2203259
SM 35:2;O2 0.0958940 0.1706350 0.2055093 -0.7730616 0.0000000 0.0000000 -1.0648027 0.0000000 0.0000000 -0.4813205 0.0000028 0.0000105 0.5834822 0.0000470 0.0002767 -0.9106688 -0.6354544 -1.2585457 -0.8710598 -0.6767857 -0.2858554
SM 36:0;O2 -0.0111866 0.9121969 0.9198971 -0.7082614 0.0000000 0.0000000 -0.8385154 0.0000000 0.0000001 -0.5780075 0.0000912 0.0002467 0.2605079 0.2003443 0.2899720 -0.9083287 -0.5081941 -1.1201986 -0.5568322 -0.8621946 -0.2938204
SM 36:2;O2 0.1192572 0.0105528 0.0145101 -0.4317656 0.0000000 0.0000000 -0.6792012 0.0000000 0.0000000 -0.1843300 0.0054819 0.0103861 0.4948712 0.0000003 0.0000042 -0.5227738 -0.3407575 -0.8073354 -0.5510670 -0.3136033 -0.0550568
SM 38:1;O2 0.0023728 0.9651665 0.9651665 -0.3867321 0.0000000 0.0000000 -0.4780844 0.0000000 0.0000000 -0.2953798 0.0001829 0.0004374 0.1827046 0.0941728 0.1585562 -0.4938831 -0.2795811 -0.6289467 -0.3272221 -0.4475832 -0.1431764
SM 38:2;O2 0.0202589 0.6615959 0.7042795 -0.1244887 0.0078144 0.0110203 -0.3189906 0.0000023 0.0000058 0.0700132 0.2876328 0.3827372 0.3890038 0.0000429 0.0002623 -0.2157379 -0.0332396 -0.4474642 -0.1905171 -0.0596023 0.1996287
SM 39:1;O2 0.0132463 0.8377596 0.8639396 -0.8523535 0.0000000 0.0000000 -1.0301067 0.0000000 0.0000000 -0.6746004 0.0000000 0.0000000 0.3555063 0.0066198 0.0179532 -0.9799252 -0.7247819 -1.2097202 -0.8504932 -0.8558105 -0.4933903
SM 40:2;O2 -1.6068364 0.0000000 0.0000000 -0.4584985 0.0000000 0.0000000 -0.1283222 0.1602696 0.1943211 -0.7886749 0.0000000 0.0000000 -0.6603526 0.0000009 0.0000109 -0.5861000 -0.3308970 -0.3079777 0.0513333 -0.9699273 -0.6074224
SM 40:2;O2 (2) 1.5455093 0.0000000 0.0000000 -0.3742896 0.0000000 0.0000000 -0.9306328 0.0000000 0.0000000 0.1820536 0.0395243 0.0615236 1.1126864 0.0000000 0.0000000 -0.4962309 -0.2523483 -1.1023191 -0.7589465 0.0088412 0.3552661
SM 41:1;O2 -0.0339174 0.5245082 0.5782816 -0.2779123 0.0000005 0.0000013 -0.4595570 0.0000000 0.0000000 -0.0962675 0.2043751 0.2786933 0.3632895 0.0008103 0.0031834 -0.3829477 -0.1728768 -0.6074408 -0.3116732 -0.2454658 0.0529309
SM 41:2;O2 0.2215315 0.0001417 0.0002337 -0.2162949 0.0001998 0.0003365 -0.4850373 0.0000000 0.0000000 0.0524474 0.5164465 0.6130481 0.5374846 0.0000049 0.0000427 -0.3284460 -0.1041438 -0.6429395 -0.3271350 -0.1068585 0.2117532
SM 43:1;O2 -0.1776364 0.1837828 0.2197403 -2.4108403 0.0000000 0.0000000 -2.7693682 0.0000000 0.0000000 -2.0523125 0.0000000 0.0000000 0.7170557 0.0078173 0.0204740 -2.6736508 -2.1480298 -3.1393901 -2.3993462 -2.4256236 -1.6790014
SM 43:2;O2 0.0616312 0.6684455 0.7070097 -2.1965647 0.0000000 0.0000000 -3.8829896 0.0000000 0.0000000 -0.5101399 0.0134376 0.0230959 3.3728497 0.0000000 0.0000000 -2.4802759 -1.9128535 -4.2824386 -3.4835406 -0.9131396 -0.1071402
SM 43:2;O2 (2) 0.3277117 0.0172375 0.0235057 -1.6190528 0.0000000 0.0000000 -0.3857598 0.0458682 0.0625476 -2.8523458 0.0000000 0.0000000 -2.4665860 0.0000000 0.0000000 -1.8879503 -1.3501553 -0.7643519 -0.0071677 -3.2343032 -2.4703884
TG 12:0_14:0_16:0 1.7854108 0.0000000 0.0000000 -0.4702951 0.0045760 0.0066818 -0.3181879 0.1687776 0.2017115 -0.6224023 0.0081398 0.0147589 -0.3042144 0.3535315 0.4487131 -0.7931794 -0.1474108 -0.7727903 0.1364145 -1.0810457 -0.1637588
TG 12:0_14:0_18:1 2.4414550 0.0000000 0.0000000 -0.6182822 0.0021990 0.0032985 -0.5340580 0.0579376 0.0770944 -0.7025065 0.0137998 0.0234739 -0.1684485 0.6720400 0.7492338 -1.0105178 -0.2260467 -1.0863029 0.0181869 -1.2596603 -0.1453526
TG 12:0_16:0_18:1 1.5954040 0.0000000 0.0000000 -0.9607872 0.0000523 0.0000959 -0.9731006 0.0032136 0.0051984 -0.9484738 0.0043820 0.0084074 0.0246268 0.9575442 0.9575442 -1.4169383 -0.5046361 -1.6153350 -0.3308663 -1.5964170 -0.3005306
TG 12:0_18:2_18:2 0.9905769 0.0013853 0.0020409 0.9460943 0.0022251 0.0033075 2.0557318 0.0000037 0.0000091 -0.1635432 0.7056012 0.7866500 -2.2192750 0.0003604 0.0016500 0.3451820 1.5470067 1.2096820 2.9017816 -1.0171136 0.6900272
TG 14:0_16:0_16:0 0.8924518 0.0000000 0.0000000 -0.9334407 0.0000000 0.0000000 -0.8848787 0.0000504 0.0001095 -0.9820028 0.0000092 0.0000323 -0.0971240 0.7477412 0.8170682 -1.2311669 -0.6357146 -1.3040599 -0.4656975 -1.4049101 -0.5590954
TG 14:0_16:0_18:1 0.6239730 0.0003298 0.0005233 -1.2789576 0.0000000 0.0000000 -1.2608972 0.0000004 0.0000012 -1.2970179 0.0000003 0.0000012 -0.0361208 0.9154887 0.9382338 -1.6145902 -0.9433250 -1.7334484 -0.7883459 -1.7737697 -0.8202661
TG 14:0_16:0_18:2 1.0251899 0.0000000 0.0000001 -0.8477238 0.0000036 0.0000074 -0.7984199 0.0015781 0.0027701 -0.8970278 0.0004553 0.0010292 -0.0986079 0.7801178 0.8358405 -1.1959809 -0.4994668 -1.2887456 -0.3080941 -1.3917121 -0.4023435
TG 15:0_16:0_16:0 1.1747101 0.0000000 0.0000000 -0.7601574 0.0000024 0.0000051 -0.7475602 0.0007962 0.0015101 -0.7727546 0.0005957 0.0013282 -0.0251945 0.9354125 0.9496720 -1.0667215 -0.4535933 -1.1791847 -0.3159356 -1.2082159 -0.3372934
TG 15:0_16:0_18:2 0.4588098 0.0014521 0.0021204 -0.9184201 0.0000000 0.0000000 -1.0213816 0.0000009 0.0000023 -0.8154587 0.0000785 0.0002196 0.2059229 0.4680071 0.5636582 -1.1979762 -0.6388640 -1.4149804 -0.6277827 -1.2125562 -0.4183611
TG 15:0_18:1_18:2 0.7105444 0.0000000 0.0000000 -0.8646686 0.0000000 0.0000000 -0.9865174 0.0000000 0.0000000 -0.7428198 0.0000119 0.0000386 0.2436976 0.2934156 0.3936063 -1.0929777 -0.6363594 -1.3079635 -0.6650713 -1.0671232 -0.4185163
TG 16:0_16:0_16:0 0.8301948 0.0000020 0.0000039 -1.1194452 0.0000000 0.0000000 -1.2853064 0.0000002 0.0000006 -0.9535841 0.0000998 0.0002656 0.3317223 0.3252722 0.4225977 -1.4514536 -0.7874369 -1.7527549 -0.8178579 -1.4251877 -0.4819804
TG 16:0_16:0_18:0 0.1929835 0.3990221 0.4509496 -1.1922226 0.0000006 0.0000013 -1.3913327 0.0000265 0.0000608 -0.9931126 0.0025754 0.0051197 0.3982200 0.3842574 0.4803218 -1.6429775 -0.7414677 -2.0259694 -0.7566959 -1.6333907 -0.3528345
TG 16:0_16:0_18:1 0.7268360 0.0000004 0.0000009 -1.0768816 0.0000000 0.0000000 -1.3966856 0.0000000 0.0000000 -0.7570776 0.0001556 0.0003891 0.6396079 0.0212991 0.0481419 -1.3484515 -0.8053117 -1.7790403 -1.0143309 -1.1428311 -0.3713242
TG 16:0_16:1_18:1 0.5424387 0.0000342 0.0000600 -0.7328197 0.0000000 0.0000001 -0.8985035 0.0000014 0.0000035 -0.5671358 0.0020141 0.0041027 0.3313678 0.1943307 0.2837572 -0.9838959 -0.4817435 -1.2520043 -0.5450028 -0.9237788 -0.2104927
TG 16:0_17:0_18:1 1.1225061 0.0000000 0.0000000 -1.7982900 0.0000000 0.0000000 -1.7865956 0.0000000 0.0000000 -1.8099844 0.0000000 0.0000000 -0.0233887 0.9381608 0.9496720 -2.0955574 -1.5010225 -2.2051310 -1.3680603 -2.2322401 -1.3877286
TG 16:0_18:0_18:1 1.1176085 0.0000000 0.0000000 -1.2663679 0.0000000 0.0000000 -1.7355449 0.0000000 0.0000000 -0.7971909 0.0008961 0.0019201 0.9383540 0.0052512 0.0160455 -1.5937238 -0.9390121 -2.1964430 -1.2746468 -1.2621859 -0.3321959
TG 16:0_18:1_18:1 0.6354892 0.0000000 0.0000000 -0.3599247 0.0001501 0.0002580 -0.6009022 0.0000084 0.0000201 -0.1189472 0.3672900 0.4771877 0.4819550 0.0101606 0.0261952 -0.5428601 -0.1769893 -0.8584647 -0.3433398 -0.3787991 0.1409047
TG 16:0_18:1_18:3 -2.9132111 0.0000000 0.0000000 0.3806832 0.0047031 0.0068071 0.7057700 0.0002257 0.0004542 0.0555963 0.7684859 0.8135660 -0.6501737 0.0154274 0.0374341 0.1184915 0.6428749 0.3366193 1.0749208 -0.3168358 0.4280285
TG 16:0_18:1_20:4 2.2711719 0.0000000 0.0000000 -0.5261703 0.0006403 0.0010061 -0.8402468 0.0001171 0.0002415 -0.2120938 0.3242893 0.4246646 0.6281531 0.0391684 0.0807847 -0.8244467 -0.2278939 -1.2602028 -0.4202909 -0.6357827 0.2115952
TG 17:0_18:1_18:1 0.4346743 0.0006370 0.0009823 -1.0911648 0.0000000 0.0000000 -1.4990719 0.0000000 0.0000000 -0.6832577 0.0001672 0.0004097 0.8158142 0.0013179 0.0049214 -1.3374696 -0.8448600 -1.8458548 -1.1522889 -1.0331232 -0.3333922
TG 18:0_18:1_18:1 1.0799636 0.0000000 0.0000000 -0.2955173 0.0223915 0.0302836 -0.6489871 0.0004302 0.0008451 0.0579526 0.7505710 0.8114987 0.7069397 0.0064923 0.0179532 -0.5485846 -0.0424499 -1.0052913 -0.2926829 -0.3015188 0.4174240
TG 18:1_18:1_18:1 0.9264672 0.0000000 0.0000000 0.4623004 0.0000020 0.0000043 0.3190257 0.0166289 0.0236531 0.6055751 0.0000105 0.0000361 0.2865494 0.1278509 0.2029546 0.2774207 0.6471800 0.0587258 0.5793255 0.3429614 0.8681887
TG 18:1_18:1_18:2 1.0863163 0.0000000 0.0000000 1.0102325 0.0000000 0.0000000 1.1672114 0.0000000 0.0000000 0.8532536 0.0000000 0.0000000 -0.3139578 0.0953956 0.1589927 0.8254160 1.1950490 0.9070004 1.4274223 0.5907296 1.1157776
TG 18:1_18:2_18:2 1.5918706 0.0000000 0.0000000 1.6475104 0.0000000 0.0000000 2.1054284 0.0000000 0.0000000 1.1895924 0.0000000 0.0000000 -0.9158359 0.0006568 0.0026434 1.3873738 1.9076469 1.7391711 2.4716856 0.8200795 1.5591053
TG 18:1_18:2_18:3 1.6578828 0.0000000 0.0000000 2.1890489 0.0000000 0.0000000 2.8932970 0.0000000 0.0000000 1.4848007 0.0000001 0.0000005 -1.4084963 0.0002242 0.0010881 1.8208704 2.5572274 2.3749230 3.4116710 0.9618189 2.0077826
ACar 16:0 0.0360313 0.6053246 0.6485620 -0.4674115 0.0000000 0.0000000 -0.5377225 0.0000002 0.0000005 -0.3971005 0.0000912 0.0002467 0.1406220 0.3138463 0.4142771 -0.6048602 -0.3299629 -0.7312423 -0.3442028 -0.5923405 -0.2018606
LPC 20:2/0:0 -0.0412361 0.5431979 0.5935606 0.4459821 0.0000000 0.0000000 0.3044771 0.0016896 0.0029346 0.5874871 0.0000000 0.0000000 0.2830100 0.0381549 0.0806463 0.3123037 0.5796606 0.1162656 0.4926886 0.3976026 0.7773716
LPC 20:0/0:0 0.0072955 0.9143220 0.9198971 0.6940687 0.0000000 0.0000000 0.5940792 0.0000000 0.0000000 0.7940583 0.0000000 0.0000000 0.1999791 0.1416984 0.2205682 0.5603439 0.8277936 0.4058023 0.7823560 0.6041079 0.9840087
DG 16:0_18:1 0.3065449 0.0195387 0.0257911 -0.6240855 0.0000036 0.0000075 -0.8672314 0.0000048 0.0000115 -0.3809397 0.0406557 0.0626934 0.4862917 0.0631490 0.1145010 -0.8807163 -0.3674548 -1.2285526 -0.5059102 -0.7454727 -0.0164067
DG 18:1_18:2 0.6896515 0.0000000 0.0000001 0.4973459 0.0000457 0.0000847 0.5228528 0.0020724 0.0034893 0.4718390 0.0057279 0.0106191 -0.0510138 0.8299424 0.8778237 0.2631521 0.7315397 0.1931215 0.8525841 0.1391767 0.8045013
SM 31:1;O2 -0.1366774 0.1179638 0.1456326 -1.4664668 0.0000000 0.0000000 -1.5881119 0.0000000 0.0000000 -1.3448216 0.0000000 0.0000000 0.2432903 0.1637516 0.2435395 -1.6382019 -1.2947316 -1.8299051 -1.3463188 -1.5887641 -1.1008792
PC 12:0_16:0 -0.7345228 0.0002421 0.0003878 -0.9806690 0.0000014 0.0000031 -0.8563683 0.0022144 0.0036907 -1.1049697 0.0001056 0.0002765 -0.2486015 0.5257996 0.6241506 -1.3668071 -0.5945309 -1.4000284 -0.3127082 -1.6534625 -0.5564770
PC 14:0_17:0 0.0885285 0.2762244 0.3187205 -1.5343714 0.0000000 0.0000000 -1.7866064 0.0000000 0.0000000 -1.2821364 0.0000000 0.0000000 0.5044700 0.0022020 0.0074148 -1.6944102 -1.3743326 -2.0119318 -1.5612810 -1.5094647 -1.0548081
PC 33:1 0.2484698 0.0015862 0.0022958 -1.2384418 0.0000000 0.0000000 -1.5367497 0.0000000 0.0000000 -0.9401340 0.0000000 0.0000000 0.5966157 0.0001658 0.0008826 -1.3911059 -1.0857778 -1.7516918 -1.3218076 -1.1569867 -0.7232812
PC 33:0 -2.5078606 0.0000000 0.0000000 -0.6876075 0.0000000 0.0000000 -0.9749810 0.0000000 0.0000000 -0.4002339 0.0001436 0.0003646 0.5747471 0.0001071 0.0005889 -0.8303871 -0.5448279 -1.1760064 -0.7739556 -0.6030462 -0.1974216
TG 12:0_14:0_18:2 0.8626013 0.0008601 0.0013141 -1.1563490 0.0000105 0.0000206 -0.3361733 0.3483080 0.3883163 -1.9765246 0.0000002 0.0000008 -1.6403513 0.0015031 0.0052767 -1.6577129 -0.6549850 -1.0420648 0.3697181 -2.6886907 -1.2643584
PC 15:0_20:4 0.8983906 0.0000000 0.0000000 -0.9810827 0.0000000 0.0000000 -1.2148811 0.0000000 0.0000000 -0.7472842 0.0000004 0.0000017 0.4675969 0.0198181 0.0460562 -1.1772666 -0.7848987 -1.4910968 -0.9386655 -1.0259552 -0.4686132
PC 15:0_20:3 0.6284271 0.0000000 0.0000000 -0.9945066 0.0000000 0.0000000 -1.0862413 0.0000000 0.0000000 -0.9027718 0.0000000 0.0000000 0.1834695 0.3415325 0.4368439 -1.1844356 -0.8045775 -1.3536505 -0.8188322 -1.1725580 -0.6329856
PC 14:0_22:6 0.9063949 0.0000000 0.0000000 -0.7521220 0.0000006 0.0000013 -0.3224378 0.1136617 0.1420771 -1.1818061 0.0000000 0.0000002 -0.8593683 0.0032946 0.0108721 -1.0364730 -0.4677709 -0.7227876 0.0779120 -1.5857147 -0.7778976
PC 18:1_18:1 0.4031570 0.0000000 0.0000000 0.4637213 0.0000000 0.0000000 0.2910630 0.0009578 0.0017565 0.6363796 0.0000000 0.0000000 0.3453166 0.0055580 0.0163763 0.3424329 0.5850098 0.1202959 0.4618301 0.4640945 0.8086647
PC 36:0 -0.6182063 0.0000000 0.0000000 -0.1427075 0.0285250 0.0382653 -0.2186250 0.0173319 0.0244424 -0.0667900 0.4675016 0.5843770 0.1518350 0.2414068 0.3347237 -0.2702291 -0.0151859 -0.3981680 -0.0390820 -0.2479290 0.1143490
PC 37:4 -0.1282855 0.0660093 0.0825116 -0.6170678 0.0000000 0.0000000 -0.8228493 0.0000000 0.0000000 -0.4112863 0.0000487 0.0001461 0.4115629 0.0034519 0.0111680 -0.7539410 -0.4801946 -1.0155588 -0.6301397 -0.6057089 -0.2168638
PC 38:5 0.8737208 0.0000000 0.0000000 -0.3118165 0.0008595 0.0013253 -0.3823114 0.0035600 0.0056480 -0.2413215 0.0659502 0.0971588 0.1409899 0.4434240 0.5460071 -0.4930394 -0.1305936 -0.6374628 -0.1271601 -0.4987410 0.0160979
PC 38:3 -2.0563770 0.0000000 0.0000000 -0.2590227 0.0186237 0.0253960 -0.1006006 0.5128263 0.5389576 -0.4174449 0.0077465 0.0142019 -0.3168443 0.1478601 0.2258974 -0.4741915 -0.0438540 -0.4035457 0.2023445 -0.7230829 -0.1118069
PC 42:5 0.0834444 0.3396308 0.3891603 0.5207343 0.0000000 0.0000000 0.3592217 0.0039147 0.0061517 0.6822468 0.0000001 0.0000007 0.3230251 0.0656349 0.1177148 0.3486508 0.6928177 0.1169382 0.6015053 0.4378096 0.9266841
TG 16:0_18:2_18:3 -1.0177442 0.0000000 0.0000000 0.7564492 0.0000011 0.0000024 1.0637052 0.0000011 0.0000029 0.4491931 0.0352510 0.0564700 -0.6145121 0.0407058 0.0827019 0.4623521 1.0505463 0.6496336 1.4777769 0.0314408 0.8669455
TG 16:0_18:2_18:2 0.9446569 0.0000000 0.0000000 0.5435289 0.0000551 0.0000999 0.6420611 0.0006513 0.0012497 0.4449966 0.0180260 0.0297428 -0.1970645 0.4532986 0.5499578 0.2846474 0.8024104 0.2775710 1.0065513 0.0772665 0.8127268
TG 54:6 0.4108555 0.0000085 0.0000156 0.4397108 0.0000021 0.0000045 0.4827148 0.0001764 0.0003593 0.3967069 0.0020832 0.0041919 -0.0860079 0.6304471 0.7274390 0.2634939 0.6159278 0.2346115 0.7308180 0.1463983 0.6470156
TG 18:2_18:2_18:3 1.0026418 0.0000899 0.0001545 2.5584567 0.0000000 0.0000000 3.1274617 0.0000000 0.0000000 1.9894516 0.0000001 0.0000004 -1.1380101 0.0238307 0.0524276 2.0659662 3.0509472 2.4340636 3.8208598 1.2898899 2.6890134
TG 18:0_18:0_18:1 0.6216137 0.0005913 0.0009204 -0.5062041 0.0048719 0.0069902 -0.8400867 0.0009581 0.0017565 -0.1723214 0.4946751 0.5957766 0.6677653 0.0614401 0.1126402 -0.8562845 -0.1561236 -1.3329797 -0.3471937 -0.6695957 0.3249529
TG 18:1_18:2_20:4 2.3719471 0.0000000 0.0000000 0.6651947 0.0000056 0.0000112 0.7311955 0.0003285 0.0006530 0.5991939 0.0033066 0.0064951 -0.1320015 0.6412693 0.7347877 0.3859301 0.9444594 0.3380070 1.1243840 0.2025104 0.9958775
TG 16:0_18:1_22:6 1.5723648 0.0000000 0.0000000 -0.7087695 0.0000269 0.0000504 -0.2581096 0.2647599 0.3012785 -1.1594294 0.0000016 0.0000063 -0.9013198 0.0066372 0.0179532 -1.0323096 -0.3852294 -0.7136354 0.1974161 -1.6190043 -0.6998545
Open code

if (file.exists("gitignore/result_lipidom.csv") == FALSE) {
  write.table(result_lipidom,
    "gitignore/result_lipidom.csv",
    row.names = FALSE
  )
}

4.3 Run - train-validation intersection

Open code
n_features <- ncol(data_analysis_narrowed) - n_covarites

4.3.1 Create empty objects

Open code
outcome <- vector('double', n_features)
log2FD_VGdiet_inCZ <- vector('double', n_features)
log2FD_VGdiet_inIT <- vector('double', n_features)
log2FD_VGdiet_avg <- vector('double', n_features)

log2FD_ITcountry_avg <- vector('double', n_features)
diet_country_int <- vector('double', n_features)


P_VGdiet_inCZ <- vector('double', n_features)
P_VGdiet_inIT <- vector('double', n_features)
P_VGdiet_avg <- vector('double', n_features)

P_ITcountry_avg <- vector('double', n_features)
P_diet_country_int <- vector('double', n_features)


CI_L_VGdiet_inCZ <- vector('double', n_features)
CI_L_VGdiet_inIT <- vector('double', n_features)
CI_L_VGdiet_avg <- vector('double', n_features)

CI_U_VGdiet_inCZ <- vector('double', n_features)
CI_U_VGdiet_inIT <- vector('double', n_features)
CI_U_VGdiet_avg <- vector('double', n_features)

4.3.2 Estimate over outcomes

Open code
for (i in 1:n_features) {
  
  ## define variable
  data_analysis_narrowed$outcome <- data_analysis_narrowed[, (i + n_covarites)]

  ## fit model
  model <- lm(outcome ~ Country_IT * Diet_VEGAN, data = data_analysis_narrowed)

  ## get contrast (effects of diet BY COUNTRY)
  contrast_emm <- summary(
    pairs(
      emmeans(
        model,
        specs = ~ Diet_VEGAN | Country_IT
        ),
      interaction = TRUE,
      adjust = "none"
      ),
    infer = c(TRUE, TRUE)
    )

  ## save results
  outcome[i] <- names(data_analysis_narrowed)[i + n_covarites]
  
  ## country effect
  log2FD_ITcountry_avg[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Country_IT"
    ), 1
  ]

  P_ITcountry_avg[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Country_IT"
    ), 4
  ]
  
  
  ## diet effect
  tr <- confint(model)
  
  CI_L_VGdiet_avg[i] <- tr[which(row.names(tr) == 'Diet_VEGAN'),][1]
  CI_U_VGdiet_avg[i] <- tr[which(row.names(tr) == 'Diet_VEGAN'),][2]
  
  log2FD_VGdiet_avg[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Diet_VEGAN"
    ), 1
  ]

  P_VGdiet_avg[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Diet_VEGAN"
    ), 4
  ]
  
  log2FD_VGdiet_inCZ[i] <- -contrast_emm[1,3]
  P_VGdiet_inCZ[i] <- contrast_emm$p.value[1]
  CI_L_VGdiet_inCZ[i] <- -contrast_emm$upper.CL[1]
  CI_U_VGdiet_inCZ[i] <- -contrast_emm$lower.CL[1]
  
  log2FD_VGdiet_inIT[i] <- -contrast_emm[2,3]
  P_VGdiet_inIT[i] <- contrast_emm$p.value[2]
  CI_L_VGdiet_inIT[i] <- -contrast_emm$upper.CL[2]
  CI_U_VGdiet_inIT[i] <- -contrast_emm$lower.CL[2]
  
  ## interaction
  diet_country_int[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Country_IT:Diet_VEGAN"
    ), 1
  ]

  P_diet_country_int[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Country_IT:Diet_VEGAN"
    ), 4
  ]
}

4.3.3 Results table

Open code
result_lipidom_narrowed <- data.frame(
  outcome,
  log2FD_ITcountry_avg, P_ITcountry_avg,
  log2FD_VGdiet_avg, P_VGdiet_avg,
  log2FD_VGdiet_inCZ, P_VGdiet_inCZ,
  log2FD_VGdiet_inIT, P_VGdiet_inIT,
  diet_country_int, P_diet_country_int,
  CI_L_VGdiet_avg, CI_U_VGdiet_avg,
  CI_L_VGdiet_inCZ, CI_U_VGdiet_inCZ,
  CI_L_VGdiet_inIT, CI_U_VGdiet_inIT
)

4.3.4 Adjust p values

Open code
result_lipidom_narrowed <- result_lipidom_narrowed %>% 
  dplyr::mutate(
    fdr_ITcountry_avg = p.adjust(P_ITcountry_avg, method = 'BH'),
    fdr_VGdiet_avg = p.adjust(P_VGdiet_avg, method = 'BH'),
    
    fdr_VGdiet_inCZ = p.adjust(P_VGdiet_inCZ, method = 'BH'),
    fdr_VGdiet_inIT = p.adjust(P_VGdiet_inIT, method = 'BH'),
    fdr_diet_country_int = p.adjust(P_diet_country_int, method = 'BH')
  ) %>% 
  dplyr::select(
    outcome,
    log2FD_ITcountry_avg, P_ITcountry_avg, fdr_ITcountry_avg,
    log2FD_VGdiet_avg, P_VGdiet_avg, fdr_VGdiet_avg,
    log2FD_VGdiet_inCZ, P_VGdiet_inCZ, fdr_VGdiet_inCZ,
    log2FD_VGdiet_inIT, P_VGdiet_inIT, fdr_VGdiet_inIT,
    diet_country_int, P_diet_country_int, fdr_diet_country_int,
    CI_L_VGdiet_avg, CI_U_VGdiet_avg,
    CI_L_VGdiet_inCZ, CI_U_VGdiet_inCZ,
    CI_L_VGdiet_inIT, CI_U_VGdiet_inIT
  )

4.3.5 Save results

Open code
kableExtra::kable(result_lipidom_narrowed %>% filter(fdr_VGdiet_avg < 0.05),
                  caption = "Result of linear models, modelling the log2-transformed level of given lipid, with `Diet`, `Country` and `Diet:Country` interaction as predictors. Only lipids which differ between diets significantly are shown (FDR < 0.05, average effect across both countries). `log2FD` prefix: implies estimated effects (regression coefficient), i.e. how much log2-transformed lipid level differ in vegans compared to omnivores, `P`: p-value, `fdr`: p-value after adjustment for multiple comparison, `CI_L` and `CI_U`: lower and upper bounds of 95% confidence interval respectively. `avg` suffix shows effect averaged across subgroups, whereas `inCZ` and `inIT` shows effect in Czech or Italian cohort respectively. All estimates in a single row are based on a single model"
                  ) 
Result of linear models, modelling the log2-transformed level of given lipid, with Diet, Country and Diet:Country interaction as predictors. Only lipids which differ between diets significantly are shown (FDR < 0.05, average effect across both countries). log2FD prefix: implies estimated effects (regression coefficient), i.e. how much log2-transformed lipid level differ in vegans compared to omnivores, P: p-value, fdr: p-value after adjustment for multiple comparison, CI_L and CI_U: lower and upper bounds of 95% confidence interval respectively. avg suffix shows effect averaged across subgroups, whereas inCZ and inIT shows effect in Czech or Italian cohort respectively. All estimates in a single row are based on a single model
outcome log2FD_ITcountry_avg P_ITcountry_avg fdr_ITcountry_avg log2FD_VGdiet_avg P_VGdiet_avg fdr_VGdiet_avg log2FD_VGdiet_inCZ P_VGdiet_inCZ fdr_VGdiet_inCZ log2FD_VGdiet_inIT P_VGdiet_inIT fdr_VGdiet_inIT diet_country_int P_diet_country_int fdr_diet_country_int CI_L_VGdiet_avg CI_U_VGdiet_avg CI_L_VGdiet_inCZ CI_U_VGdiet_inCZ CI_L_VGdiet_inIT CI_U_VGdiet_inIT
ACar 16:0 0.0360313 0.6053246 0.6475565 -0.4674115 0.0000000 0.0000000 -0.5377225 0.0000002 0.0000004 -0.3971005 0.0000912 0.0001646 0.1406220 0.3138463 0.4511540 -0.6048602 -0.3299629 -0.7312423 -0.3442028 -0.5923405 -0.2018606
ACar 18:1 0.2608033 0.0012225 0.0020083 0.2998231 0.0002173 0.0002531 0.1396406 0.2122055 0.2244012 0.4600057 0.0000689 0.0001320 0.3203651 0.0447693 0.1083887 0.1434272 0.4562191 -0.0805558 0.3598370 0.2378519 0.6821594
ACar 18:2 -0.1759630 0.0263467 0.0367257 0.8958953 0.0000000 0.0000000 0.9005994 0.0000000 0.0000000 0.8911912 0.0000000 0.0000000 -0.0094082 0.9522750 0.9575442 0.7408912 1.0508994 0.6823626 1.1188362 0.6710145 1.1113680
CE 16:1 -0.1140907 0.3730151 0.4399665 -1.3451145 0.0000000 0.0000000 -1.6639735 0.0000000 0.0000000 -1.0262555 0.0000001 0.0000003 0.6377180 0.0135675 0.0416069 -1.5973643 -1.0928646 -2.0191267 -1.3088203 -1.3845656 -0.6679453
CE 20:3 0.6441380 0.0000000 0.0000000 -0.2127769 0.0143419 0.0155230 -0.3333936 0.0065514 0.0079306 -0.0921602 0.4513329 0.5002726 0.2412334 0.1623792 0.2740523 -0.3825021 -0.0430517 -0.5723569 -0.0944304 -0.3332476 0.1489272
CE 20:4 1.0731406 0.0000000 0.0000000 -0.2476516 0.0057704 0.0063200 -0.4937811 0.0001119 0.0001806 -0.0015221 0.9903519 0.9903519 0.4922590 0.0060698 0.0232675 -0.4224109 -0.0728923 -0.7398320 -0.2477301 -0.2497602 0.2467160
CE 22:6 1.7378429 0.0000000 0.0000000 -0.9393940 0.0000000 0.0000000 -0.7465059 0.0000435 0.0000741 -1.1322821 0.0000000 0.0000000 -0.3857762 0.1279229 0.2307629 -1.1883414 -0.6904465 -1.0970095 -0.3960023 -1.4859013 -0.7786628
Cer 18:1_22:0;O2 0.1739003 0.0195285 0.0280869 -0.4777728 0.0000000 0.0000000 -0.5640303 0.0000002 0.0000005 -0.3915152 0.0002580 0.0004092 0.1725150 0.2436086 0.3674097 -0.6233448 -0.3322008 -0.7689872 -0.3590733 -0.5982941 -0.1847364
Cer 18:1_23:0;O2 0.1102785 0.1182713 0.1554423 -0.6312541 0.0000000 0.0000000 -0.8660629 0.0000000 0.0000000 -0.3964452 0.0001072 0.0001827 0.4696177 0.0010326 0.0067856 -0.7699359 -0.4925723 -1.0613189 -0.6708070 -0.5934368 -0.1994537
Cer 18:1_24:0;O2 0.2121668 0.0031127 0.0048537 -0.1691251 0.0178553 0.0191011 -0.2789948 0.0056738 0.0069599 -0.0592553 0.5557222 0.5969918 0.2197395 0.1219254 0.2289212 -0.3086728 -0.0295773 -0.4754700 -0.0825196 -0.2574770 0.1389664
Cer 18:1_24:1;O2 0.0452716 0.5257106 0.5827153 -0.4067465 0.0000001 0.0000001 -0.5801159 0.0000000 0.0000001 -0.2333770 0.0223059 0.0281116 0.3467390 0.0159948 0.0474684 -0.5473517 -0.2661412 -0.7780799 -0.3821519 -0.4331007 -0.0336532
DG 16:0_18:1 0.3065449 0.0195387 0.0280869 -0.6240855 0.0000036 0.0000050 -0.8672314 0.0000048 0.0000089 -0.3809397 0.0406557 0.0505449 0.4862917 0.0631490 0.1417002 -0.8807163 -0.3674548 -1.2285526 -0.5059102 -0.7454727 -0.0164067
LPC 18:2/0:0 0.0453058 0.5123547 0.5827153 0.2726641 0.0001171 0.0001418 0.1366954 0.1613454 0.1746326 0.4086329 0.0000504 0.0001009 0.2719376 0.0505184 0.1161924 0.1363845 0.4089438 -0.0551785 0.3285692 0.2150535 0.6022123
LPC 20:1/0:0 -0.1633211 0.0235411 0.0333197 0.5742817 0.0000000 0.0000000 0.3410640 0.0008789 0.0012835 0.8074995 0.0000000 0.0000000 0.4664355 0.0013422 0.0077177 0.4332202 0.7153433 0.1424575 0.5396704 0.6071276 1.0078714
LPC 20:2/0:0 -0.0412361 0.5431979 0.5949310 0.4459821 0.0000000 0.0000000 0.3044771 0.0016896 0.0023201 0.5874871 0.0000000 0.0000000 0.2830100 0.0381549 0.0973916 0.3123037 0.5796606 0.1162656 0.4926886 0.3976026 0.7773716
LPC 20:5/0:0 0.1338801 0.1467344 0.1901347 0.3994660 0.0000243 0.0000311 0.2071146 0.1110719 0.1246173 0.5918175 0.0000112 0.0000254 0.3847030 0.0377524 0.0973916 0.2181389 0.5807932 -0.0481836 0.4624127 0.3342500 0.8493851
LPC 22:6/0:0 -0.0606988 0.5529415 0.5984779 -0.6858047 0.0000000 0.0000000 -0.6399541 0.0000161 0.0000290 -0.7316554 0.0000012 0.0000034 -0.0917013 0.6539225 0.7712932 -0.8874331 -0.4841764 -0.9238351 -0.3560731 -1.0180598 -0.4452509
PC 12:0_16:0 -0.7345228 0.0002421 0.0004367 -0.9806690 0.0000014 0.0000021 -0.8563683 0.0022144 0.0029919 -1.1049697 0.0001056 0.0001827 -0.2486015 0.5257996 0.6536968 -1.3668071 -0.5945309 -1.4000284 -0.3127082 -1.6534625 -0.5564770
PC 14:0_16:0 -0.6734103 0.0000000 0.0000000 -0.8085154 0.0000000 0.0000000 -0.7269851 0.0000002 0.0000005 -0.8900457 0.0000000 0.0000000 -0.1630606 0.3930921 0.5241227 -0.9965659 -0.6204649 -0.9917493 -0.4622208 -1.1571634 -0.6229279
PC 14:0_17:0 0.0885285 0.2762244 0.3343770 -1.5343714 0.0000000 0.0000000 -1.7866064 0.0000000 0.0000000 -1.2821364 0.0000000 0.0000000 0.5044700 0.0022020 0.0112546 -1.6944102 -1.3743326 -2.0119318 -1.5612810 -1.5094647 -1.0548081
PC 14:0_20:4 0.6841718 0.0000020 0.0000044 -0.3025840 0.0304554 0.0322057 -0.2803751 0.1526221 0.1671575 -0.3247930 0.1008760 0.1205271 -0.0444178 0.8728519 0.9337485 -0.5762516 -0.0289165 -0.6656831 0.1049329 -0.7135260 0.0639401
PC 14:0_22:6 0.9063949 0.0000000 0.0000000 -0.7521220 0.0000006 0.0000008 -0.3224378 0.1136617 0.1259864 -1.1818061 0.0000000 0.0000002 -0.8593683 0.0032946 0.0158789 -1.0364730 -0.4677709 -0.7227876 0.0779120 -1.5857147 -0.7778976
PC 15:0_18:2 0.0492171 0.5147383 0.5827153 -0.6813049 0.0000000 0.0000000 -0.8859663 0.0000000 0.0000000 -0.4766434 0.0000161 0.0000345 0.4093230 0.0073689 0.0251089 -0.8301912 -0.5324185 -1.0955897 -0.6763430 -0.6881301 -0.2651567
PC 15:0_20:3 0.6284271 0.0000000 0.0000000 -0.9945066 0.0000000 0.0000000 -1.0862413 0.0000000 0.0000000 -0.9027718 0.0000000 0.0000000 0.1834695 0.3415325 0.4689700 -1.1844356 -0.8045775 -1.3536505 -0.8188322 -1.1725580 -0.6329856
PC 15:0_20:4 0.8983906 0.0000000 0.0000000 -0.9810827 0.0000000 0.0000000 -1.2148811 0.0000000 0.0000000 -0.7472842 0.0000004 0.0000011 0.4675969 0.0198181 0.0569771 -1.1772666 -0.7848987 -1.4910968 -0.9386655 -1.0259552 -0.4686132
PC 16:0_16:0 0.1073072 0.0048297 0.0074056 -0.1719398 0.0000094 0.0000125 -0.3064757 0.0000000 0.0000001 -0.0374039 0.4839745 0.5300673 0.2690718 0.0004510 0.0037718 -0.2460758 -0.0978037 -0.4108549 -0.2020964 -0.1427110 0.0679032
PC 16:0_16:1 0.0226561 0.8060423 0.8332123 -0.7121891 0.0000000 0.0000000 -0.8719703 0.0000000 0.0000000 -0.5524079 0.0000410 0.0000858 0.3195624 0.0847929 0.1733543 -0.8941446 -0.5302336 -1.1281531 -0.6157875 -0.8108679 -0.2939478
PC 16:0_18:0 0.1968568 0.0001996 0.0003747 -0.2902152 0.0000001 0.0000001 -0.4405993 0.0000000 0.0000000 -0.1398312 0.0585960 0.0718778 0.3007681 0.0041373 0.0181252 -0.3922784 -0.1881520 -0.5842983 -0.2969002 -0.2848076 0.0051452
PC 16:0_18:1 0.2015973 0.0000007 0.0000017 -0.2447824 0.0000000 0.0000000 -0.4100626 0.0000000 0.0000000 -0.0795021 0.1537823 0.1790882 0.3305604 0.0000393 0.0006028 -0.3219177 -0.1676470 -0.5186647 -0.3014605 -0.1890696 0.0300653
PC 16:0_20:3 (2) 5.4191872 0.0000000 0.0000000 -0.8710277 0.0000000 0.0000000 -1.5130663 0.0000000 0.0000000 -0.2289891 0.1331166 0.1570094 1.2840772 0.0000000 0.0000004 -1.0819375 -0.6601179 -1.8100151 -1.2161175 -0.5285775 0.0705993
PC 16:0_20:5 0.4752677 0.0002082 0.0003831 -0.7165998 0.0000001 0.0000001 -0.5473985 0.0022439 0.0029919 -0.8858012 0.0000016 0.0000042 -0.3384027 0.1782406 0.2928238 -0.9637525 -0.4694472 -0.8953751 -0.1994218 -1.2368710 -0.5347314
PC 16:0_22:4 1.2297374 0.0000000 0.0000000 -0.1887850 0.0327772 0.0342671 -0.3497438 0.0052013 0.0064665 -0.0278261 0.8234305 0.8417289 0.3219177 0.0681883 0.1458912 -0.3619085 -0.0156614 -0.5934918 -0.1059959 -0.2737407 0.2180885
PC 16:0_22:6 0.6839676 0.0000000 0.0000000 -0.5175854 0.0000000 0.0000000 -0.4040879 0.0000410 0.0000713 -0.6310828 0.0000000 0.0000000 -0.2269948 0.0970291 0.1859725 -0.6518732 -0.3832975 -0.5931575 -0.2150184 -0.8218330 -0.4403326
PC 16:1_18:2 0.3025899 0.0000864 0.0001692 0.4535819 0.0000000 0.0000000 0.3415782 0.0014982 0.0021205 0.5655856 0.0000004 0.0000011 0.2240074 0.1376507 0.2435358 0.3053238 0.6018399 0.1328394 0.5503169 0.3549913 0.7761798
PC 17:0_18:1 0.8251383 0.0000000 0.0000000 -0.7887386 0.0000000 0.0000000 -0.8805693 0.0000000 0.0000000 -0.6969080 0.0000000 0.0000000 0.1836613 0.1638356 0.2740523 -0.9184085 -0.6590687 -1.0631369 -0.6980016 -0.8810985 -0.5127175
PC 18:0_18:1 0.3398991 0.0000000 0.0000000 -0.2394262 0.0000148 0.0000191 -0.4438558 0.0000000 0.0000001 -0.0349965 0.6459225 0.6830445 0.4088593 0.0001926 0.0019684 -0.3451470 -0.1337053 -0.5927046 -0.2950070 -0.1851685 0.1151754
PC 18:0_22:5 0.7093392 0.0000000 0.0000000 0.2626571 0.0004738 0.0005449 0.2727778 0.0092953 0.0111061 0.2525364 0.0168104 0.0217825 -0.0202414 0.8907485 0.9419410 0.1173521 0.4079621 0.0681967 0.4773588 0.0461368 0.4589359
PC 18:0_22:6 1.0581591 0.0000000 0.0000000 -0.5490905 0.0000000 0.0000000 -0.3877502 0.0027743 0.0036462 -0.7104309 0.0000001 0.0000005 -0.3226807 0.0768573 0.1607016 -0.7280306 -0.3701505 -0.6396875 -0.1358130 -0.9646076 -0.4562541
PC 18:1_18:1 0.4031570 0.0000000 0.0000000 0.4637213 0.0000000 0.0000000 0.2910630 0.0009578 0.0013768 0.6363796 0.0000000 0.0000000 0.3453166 0.0055580 0.0222320 0.3424329 0.5850098 0.1202959 0.4618301 0.4640945 0.8086647
PC 18:1_18:2 0.2109613 0.0000261 0.0000534 0.5520328 0.0000000 0.0000000 0.5039490 0.0000000 0.0000000 0.6001166 0.0000000 0.0000000 0.0961676 0.3247535 0.4534097 0.4558857 0.6481798 0.3685795 0.6393185 0.4635438 0.7366894
PC 18:1_20:3 1.0367053 0.0000000 0.0000000 0.4469125 0.0000005 0.0000008 0.4948140 0.0000579 0.0000952 0.3990109 0.0011798 0.0017506 -0.0958032 0.5738827 0.7039628 0.2790079 0.6148170 0.2584141 0.7312140 0.1605096 0.6375122
PC 18:1_20:4 0.6341276 0.0000000 0.0000000 0.2003139 0.0001843 0.0002174 0.0968305 0.1902939 0.2035702 0.3037972 0.0000687 0.0001320 0.2069668 0.0495415 0.1161924 0.0970405 0.3035872 -0.0485724 0.2422333 0.1571019 0.4504926
PC 18:2_18:2 0.4161300 0.0000000 0.0000001 0.4902017 0.0000000 0.0000000 0.5141575 0.0000012 0.0000024 0.4662459 0.0000113 0.0000254 -0.0479116 0.7409678 0.8492863 0.3473114 0.6330919 0.3129763 0.7153386 0.2632764 0.6692154
PC 18:2_18:3 0.2693107 0.0384234 0.0527605 1.1930357 0.0000000 0.0000000 1.3468692 0.0000000 0.0000000 1.0392022 0.0000001 0.0000003 -0.3076669 0.2348031 0.3600315 0.9382618 1.4478096 0.9881623 1.7055760 0.6773068 1.4010976
PC 33:1 0.2484698 0.0015862 0.0025160 -1.2384418 0.0000000 0.0000000 -1.5367497 0.0000000 0.0000000 -0.9401340 0.0000000 0.0000000 0.5966157 0.0001658 0.0019071 -1.3911059 -1.0857778 -1.7516918 -1.3218076 -1.1569867 -0.7232812
PC 37:4 -0.1282855 0.0660093 0.0893067 -0.6170678 0.0000000 0.0000000 -0.8228493 0.0000000 0.0000000 -0.4112863 0.0000487 0.0000996 0.4115629 0.0034519 0.0158789 -0.7539410 -0.4801946 -1.0155588 -0.6301397 -0.6057089 -0.2168638
PC 37:6 0.9572387 0.0000000 0.0000000 -1.5008639 0.0000000 0.0000000 -1.3776541 0.0000000 0.0000000 -1.6240736 0.0000000 0.0000000 -0.2464195 0.2997851 0.4377814 -1.7347983 -1.2669294 -1.7070203 -1.0482879 -1.9563676 -1.2917797
PC 38:5 0.8737208 0.0000000 0.0000000 -0.3118165 0.0008595 0.0009643 -0.3823114 0.0035600 0.0045489 -0.2413215 0.0659502 0.0798345 0.1409899 0.4434240 0.5827858 -0.4930394 -0.1305936 -0.6374628 -0.1271601 -0.4987410 0.0160979
PC 42:5 0.0834444 0.3396308 0.4057926 0.5207343 0.0000000 0.0000000 0.3592217 0.0039147 0.0049336 0.6822468 0.0000001 0.0000005 0.3230251 0.0656349 0.1437717 0.3486508 0.6928177 0.1169382 0.6015053 0.4378096 0.9266841
SM 31:1;O2 -0.1366774 0.1179638 0.1554423 -1.4664668 0.0000000 0.0000000 -1.5881119 0.0000000 0.0000000 -1.3448216 0.0000000 0.0000000 0.2432903 0.1637516 0.2740523 -1.6382019 -1.2947316 -1.8299051 -1.3463188 -1.5887641 -1.1008792
SM 32:0;O2 -0.3856184 0.0000251 0.0000524 -0.7468996 0.0000000 0.0000000 -0.7209840 0.0000000 0.0000001 -0.7728151 0.0000000 0.0000000 -0.0518311 0.7706964 0.8542659 -0.9222273 -0.5715718 -0.9678353 -0.4741327 -1.0218606 -0.5237696
SM 32:2;O2 -0.0971652 0.2530543 0.3146081 -0.4263996 0.0000013 0.0000019 -0.4159114 0.0006331 0.0009548 -0.4368879 0.0003819 0.0005955 -0.0209765 0.9016077 0.9425899 -0.5937016 -0.2590977 -0.6514628 -0.1803599 -0.6745332 -0.1992426
SM 33:1;O2 0.0592394 0.2756835 0.3343770 -1.1162588 0.0000000 0.0000000 -1.3544274 0.0000000 0.0000000 -0.8780901 0.0000000 0.0000000 0.4763372 0.0000201 0.0003706 -1.2232287 -1.0092888 -1.5050349 -1.2038198 -1.0300364 -0.7261438
SM 35:2;O2 0.0958940 0.1706350 0.2180336 -0.7730616 0.0000000 0.0000000 -1.0648027 0.0000000 0.0000000 -0.4813205 0.0000028 0.0000069 0.5834822 0.0000470 0.0006171 -0.9106688 -0.6354544 -1.2585457 -0.8710598 -0.6767857 -0.2858554
SM 36:0;O2 -0.0111866 0.9121969 0.9222210 -0.7082614 0.0000000 0.0000000 -0.8385154 0.0000000 0.0000001 -0.5780075 0.0000912 0.0001646 0.2605079 0.2003443 0.3177875 -0.9083287 -0.5081941 -1.1201986 -0.5568322 -0.8621946 -0.2938204
SM 36:2;O2 0.1192572 0.0105528 0.0159157 -0.4317656 0.0000000 0.0000000 -0.6792012 0.0000000 0.0000000 -0.1843300 0.0054819 0.0074166 0.4948712 0.0000003 0.0000064 -0.5227738 -0.3407575 -0.8073354 -0.5510670 -0.3136033 -0.0550568
SM 38:1;O2 0.0023728 0.9651665 0.9651665 -0.3867321 0.0000000 0.0000000 -0.4780844 0.0000000 0.0000000 -0.2953798 0.0001829 0.0002952 0.1827046 0.0941728 0.1859725 -0.4938831 -0.2795811 -0.6289467 -0.3272221 -0.4475832 -0.1431764
SM 39:1;O2 0.0132463 0.8377596 0.8563765 -0.8523535 0.0000000 0.0000000 -1.0301067 0.0000000 0.0000000 -0.6746004 0.0000000 0.0000000 0.3555063 0.0066198 0.0234856 -0.9799252 -0.7247819 -1.2097202 -0.8504932 -0.8558105 -0.4933903
SM 41:1;O2 -0.0339174 0.5245082 0.5827153 -0.2779123 0.0000005 0.0000008 -0.4595570 0.0000000 0.0000000 -0.0962675 0.2043751 0.2350314 0.3632895 0.0008103 0.0057346 -0.3829477 -0.1728768 -0.6074408 -0.3116732 -0.2454658 0.0529309
SM 43:1;O2 -0.1776364 0.1837828 0.2316167 -2.4108403 0.0000000 0.0000000 -2.7693682 0.0000000 0.0000000 -2.0523125 0.0000000 0.0000000 0.7170557 0.0078173 0.0256855 -2.6736508 -2.1480298 -3.1393901 -2.3993462 -2.4256236 -1.6790014
SM 43:2;O2 0.0616312 0.6684455 0.7068619 -2.1965647 0.0000000 0.0000000 -3.8829896 0.0000000 0.0000000 -0.5101399 0.0134376 0.0179168 3.3728497 0.0000000 0.0000000 -2.4802759 -1.9128535 -4.2824386 -3.4835406 -0.9131396 -0.1071402
SM 43:2;O2 (2) 0.3277117 0.0172375 0.0255782 -1.6190528 0.0000000 0.0000000 -0.3857598 0.0458682 0.0534162 -2.8523458 0.0000000 0.0000000 -2.4665860 0.0000000 0.0000000 -1.8879503 -1.3501553 -0.7643519 -0.0071677 -3.2343032 -2.4703884
TG 12:0_14:0_18:1 2.4414550 0.0000000 0.0000000 -0.6182822 0.0021990 0.0024374 -0.5340580 0.0579376 0.0666283 -0.7025065 0.0137998 0.0181369 -0.1684485 0.6720400 0.7826289 -1.0105178 -0.2260467 -1.0863029 0.0181869 -1.2596603 -0.1453526
TG 12:0_14:0_18:2 0.8626013 0.0008601 0.0014654 -1.1563490 0.0000105 0.0000138 -0.3361733 0.3483080 0.3521355 -1.9765246 0.0000002 0.0000005 -1.6403513 0.0015031 0.0081342 -1.6577129 -0.6549850 -1.0420648 0.3697181 -2.6886907 -1.2643584
TG 12:0_16:0_18:1 1.5954040 0.0000000 0.0000000 -0.9607872 0.0000523 0.0000650 -0.9731006 0.0032136 0.0041640 -0.9484738 0.0043820 0.0060171 0.0246268 0.9575442 0.9575442 -1.4169383 -0.5046361 -1.6153350 -0.3308663 -1.5964170 -0.3005306
TG 14:0_16:0_16:0 0.8924518 0.0000000 0.0000001 -0.9334407 0.0000000 0.0000000 -0.8848787 0.0000504 0.0000843 -0.9820028 0.0000092 0.0000223 -0.0971240 0.7477412 0.8492863 -1.2311669 -0.6357146 -1.3040599 -0.4656975 -1.4049101 -0.5590954
TG 14:0_16:0_18:1 0.6239730 0.0003298 0.0005835 -1.2789576 0.0000000 0.0000000 -1.2608972 0.0000004 0.0000009 -1.2970179 0.0000003 0.0000008 -0.0361208 0.9154887 0.9463479 -1.6145902 -0.9433250 -1.7334484 -0.7883459 -1.7737697 -0.8202661
TG 14:0_16:0_18:2 1.0251899 0.0000000 0.0000001 -0.8477238 0.0000036 0.0000050 -0.7984199 0.0015781 0.0021998 -0.8970278 0.0004553 0.0006982 -0.0986079 0.7801178 0.8544147 -1.1959809 -0.4994668 -1.2887456 -0.3080941 -1.3917121 -0.4023435
TG 15:0_16:0_18:2 0.4588098 0.0014521 0.0023438 -0.9184201 0.0000000 0.0000000 -1.0213816 0.0000009 0.0000017 -0.8154587 0.0000785 0.0001475 0.2059229 0.4680071 0.5980091 -1.1979762 -0.6388640 -1.4149804 -0.6277827 -1.2125562 -0.4183611
TG 15:0_18:1_18:2 0.7105444 0.0000000 0.0000000 -0.8646686 0.0000000 0.0000000 -0.9865174 0.0000000 0.0000000 -0.7428198 0.0000119 0.0000261 0.2436976 0.2934156 0.4353909 -1.0929777 -0.6363594 -1.3079635 -0.6650713 -1.0671232 -0.4185163
TG 16:0_16:0_16:0 0.8301948 0.0000020 0.0000044 -1.1194452 0.0000000 0.0000000 -1.2853064 0.0000002 0.0000005 -0.9535841 0.0000998 0.0001766 0.3317223 0.3252722 0.4534097 -1.4514536 -0.7874369 -1.7527549 -0.8178579 -1.4251877 -0.4819804
TG 16:0_16:0_18:0 0.1929835 0.3990221 0.4646840 -1.1922226 0.0000006 0.0000008 -1.3913327 0.0000265 0.0000469 -0.9931126 0.0025754 0.0036451 0.3982200 0.3842574 0.5198777 -1.6429775 -0.7414677 -2.0259694 -0.7566959 -1.6333907 -0.3528345
TG 16:0_16:0_18:1 0.7268360 0.0000004 0.0000010 -1.0768816 0.0000000 0.0000000 -1.3966856 0.0000000 0.0000000 -0.7570776 0.0001556 0.0002604 0.6396079 0.0212991 0.0593794 -1.3484515 -0.8053117 -1.7790403 -1.0143309 -1.1428311 -0.3713242
TG 16:0_16:1_18:1 0.5424387 0.0000342 0.0000684 -0.7328197 0.0000000 0.0000001 -0.8985035 0.0000014 0.0000027 -0.5671358 0.0020141 0.0029412 0.3313678 0.1943307 0.3136565 -0.9838959 -0.4817435 -1.2520043 -0.5450028 -0.9237788 -0.2104927
TG 16:0_17:0_18:1 1.1225061 0.0000000 0.0000000 -1.7982900 0.0000000 0.0000000 -1.7865956 0.0000000 0.0000000 -1.8099844 0.0000000 0.0000000 -0.0233887 0.9381608 0.9575442 -2.0955574 -1.5010225 -2.2051310 -1.3680603 -2.2322401 -1.3877286
TG 16:0_18:0_18:1 1.1176085 0.0000000 0.0000000 -1.2663679 0.0000000 0.0000000 -1.7355449 0.0000000 0.0000000 -0.7971909 0.0008961 0.0013514 0.9383540 0.0052512 0.0219597 -1.5937238 -0.9390121 -2.1964430 -1.2746468 -1.2621859 -0.3321959
TG 16:0_18:1_18:1 0.6354892 0.0000000 0.0000000 -0.3599247 0.0001501 0.0001793 -0.6009022 0.0000084 0.0000154 -0.1189472 0.3672900 0.4120814 0.4819550 0.0101606 0.0322336 -0.5428601 -0.1769893 -0.8584647 -0.3433398 -0.3787991 0.1409047
TG 16:0_18:1_20:4 2.2711719 0.0000000 0.0000000 -0.5261703 0.0006403 0.0007272 -0.8402468 0.0001171 0.0001857 -0.2120938 0.3242893 0.3683286 0.6281531 0.0391684 0.0973916 -0.8244467 -0.2278939 -1.2602028 -0.4202909 -0.6357827 0.2115952
TG 16:0_18:1_22:6 1.5723648 0.0000000 0.0000000 -0.7087695 0.0000269 0.0000339 -0.2581096 0.2647599 0.2736844 -1.1594294 0.0000016 0.0000042 -0.9013198 0.0066372 0.0234856 -1.0323096 -0.3852294 -0.7136354 0.1974161 -1.6190043 -0.6998545
TG 16:0_18:2_18:2 0.9446569 0.0000000 0.0000000 0.5435289 0.0000551 0.0000676 0.6420611 0.0006513 0.0009665 0.4449966 0.0180260 0.0230332 -0.1970645 0.4532986 0.5873728 0.2846474 0.8024104 0.2775710 1.0065513 0.0772665 0.8127268
TG 17:0_18:1_18:1 0.4346743 0.0006370 0.0011058 -1.0911648 0.0000000 0.0000000 -1.4990719 0.0000000 0.0000000 -0.6832577 0.0001672 0.0002747 0.8158142 0.0013179 0.0077177 -1.3374696 -0.8448600 -1.8458548 -1.1522889 -1.0331232 -0.3333922
TG 18:1_18:1_18:1 0.9264672 0.0000000 0.0000000 0.4623004 0.0000020 0.0000029 0.3190257 0.0166289 0.0196135 0.6055751 0.0000105 0.0000248 0.2865494 0.1278509 0.2307629 0.2774207 0.6471800 0.0587258 0.5793255 0.3429614 0.8681887
TG 18:1_18:1_18:2 1.0863163 0.0000000 0.0000000 1.0102325 0.0000000 0.0000000 1.1672114 0.0000000 0.0000000 0.8532536 0.0000000 0.0000000 -0.3139578 0.0953956 0.1859725 0.8254160 1.1950490 0.9070004 1.4274223 0.5907296 1.1157776
TG 18:1_18:2_18:2 1.5918706 0.0000000 0.0000000 1.6475104 0.0000000 0.0000000 2.1054284 0.0000000 0.0000000 1.1895924 0.0000000 0.0000000 -0.9158359 0.0006568 0.0050358 1.3873738 1.9076469 1.7391711 2.4716856 0.8200795 1.5591053
TG 18:1_18:2_18:3 1.6578828 0.0000000 0.0000000 2.1890489 0.0000000 0.0000000 2.8932970 0.0000000 0.0000000 1.4848007 0.0000001 0.0000003 -1.4084963 0.0002242 0.0020629 1.8208704 2.5572274 2.3749230 3.4116710 0.9618189 2.0077826
TG 18:1_18:2_20:4 2.3719471 0.0000000 0.0000000 0.6651947 0.0000056 0.0000075 0.7311955 0.0003285 0.0005037 0.5991939 0.0033066 0.0046092 -0.1320015 0.6412693 0.7661919 0.3859301 0.9444594 0.3380070 1.1243840 0.2025104 0.9958775
TG 18:2_18:2_18:3 1.0026418 0.0000899 0.0001722 2.5584567 0.0000000 0.0000000 3.1274617 0.0000000 0.0000000 1.9894516 0.0000001 0.0000003 -1.1380101 0.0238307 0.0644832 2.0659662 3.0509472 2.4340636 3.8208598 1.2898899 2.6890134
TG 54:6 0.4108555 0.0000085 0.0000182 0.4397108 0.0000021 0.0000030 0.4827148 0.0001764 0.0002751 0.3967069 0.0020832 0.0029947 -0.0860079 0.6304471 0.7631728 0.2634939 0.6159278 0.2346115 0.7308180 0.1463983 0.6470156
Open code

if(file.exists('gitignore/result_lipidom_narrowed.csv') == FALSE){
  write.table(result_lipidom_narrowed, 
              'gitignore/result_lipidom_narrowed.csv', 
              row.names = FALSE)
  }

5 Elastic net

To assess the predictive power of lipidome features on diet strategy, we employed Elastic Net logistic regression with lipids that were measured in both training and validating cohorts.

As we expected very high level of co-linearity, we allowed \(alpha\) to rather small (0, 0.2 or 0.4). All features were standardized by 2 standard deviations.

The performance of the predictive model was evaluated through their capacity of discriminate between vegan and omnivore diets, using out-of-sample area under ROC curve (AUC; estimated with out-of-bag bootstrap) as the measure of discriminatory capacity.

All features were transformed by 2 standard deviations (resulting in standard deviation of 0.5).

5.1 Prepare data for glmnet

Open code

data_lipids_glmnet <- data_lipids_original %>%
  na.omit() %>%
  dplyr::mutate(
    vegan = as.numeric(
      dplyr::if_else(
        Diet == "VEGAN", 1, 0
      )
    ),
    dplyr::across(
      `ACar 10:0`:`TG 18:1_18:1_20:4`, ~ arm::rescale(trans_lipid(.))
    )
  ) %>%
  dplyr::select(
    vegan,
    dplyr::everything()
  ) %>%
  dplyr::select(
    Sample, vegan,Country, `ACar 10:0`:`TG 18:1_18:1_20:4`
  )

data_lipids_glmnet_inter_CompletVal <- data_lipids_glmnet %>%
  dplyr::select(
    Sample, vegan, Country, 
    dplyr::all_of(
      intersect(
        colnames(
          data_lipids_validation
          ), colnames(
            data_lipids_glmnet
            )
        )
      )
    )

dim(data_lipids_glmnet_inter_CompletVal)
## [1] 160  95

5.2 Fit model

Open code
modelac <- "elanet_lipid_inter_CompletVal"

assign(
  modelac,
  run(
    expr = clust_glmnet_sep(
      data = data_lipids_glmnet_inter_CompletVal,
      outcome = "vegan",
      clust_id = "Sample",
      sample_method = "oos_boot",
      N = 500,
      alphas = c(0, 0.2, 0.4),
      family = "binomial",
      seed = 478
    ),
    path = paste0("gitignore/run/", modelac)
  )
)

5.3 Model summary

Open code
elanet_lipid_inter_CompletVal$model_summary
##   alpha      lambda auc auc_OutOfSample auc_oos_CIL auc_oos_CIU accuracy
## 1   0.2 0.003591434   1       0.9989928   0.9949107           1        1
##   accuracy_OutOfSample accuracy_oos_CIL accuracy_oos_CIU
## 1            0.9805584        0.9454545                1
elanet_lipid_inter_CompletVal$country_AUC
##   auc_OutOfSample_IT auc_oos_CIL_IT auc_oos_CIU_IT auc_OutOfSample_CZ
## 1          0.9982946      0.9847802              1          0.9996571
##   auc_oos_CIL_CZ auc_oos_CIU_CZ
## 1      0.9950538              1

5.4 ROC curve - internal validation

Open code
elanet_lipid_inter_CompletVal$plot

Receiver operating characteristic (ROC) curves from a random subset of out-of-bag bootstrap iterations, illustrating the model’s ability to discriminate between vegan and omnivore status based on standardized log2(lipid) levels. Each curve corresponds to an elastic net model trained on a bootstrap resample and evaluated on the subjects not included in that iteration (i.e., out-of-bag samples). The curve plots the true positive rate (sensitivity) against the false positive rate (1 – specificity) across thresholds of predicted vegan probability. The area under the curve (AUC) quantifies overall discriminatory performance, with values closer to 1 indicating stronger separation between groups.

\(\rightarrow\) The observed performance (AUC ≈ 1) indicates near-perfect discrimination. Given the extremely strong signal in the lipidomic data—where several lipid levels show minimal overlap between diet groups—this result is plausible but may still raise concerns about overfitting or data leakage. To evaluate whether the observed performance could arise by chance under similar model complexity, we repeated the analysis using a dataset with randomly permuted diet labels (i.e., outcome reshuffling).

5.5 Sensitivity analysis

Open code
## re-arrange data (permute outcome labels for sensitivity check
set.seed(2025)
data_lipids_glmnet_inter_CompletVal_sens <- data_lipids_glmnet_inter_CompletVal %>% 
  mutate(vegan2 = sample(data_lipids_glmnet_inter_CompletVal$vegan))

## verify I did what I wanted
mean(data_lipids_glmnet_inter_CompletVal_sens$vegan)
## [1] 0.5625
mean(data_lipids_glmnet_inter_CompletVal_sens$vegan2)
## [1] 0.5625

data_lipids_glmnet_inter_CompletVal_sens[1:20, c("vegan", "vegan2")]
## # A tibble: 20 × 2
##    vegan vegan2
##    <dbl>  <dbl>
##  1     1      1
##  2     1      1
##  3     1      0
##  4     1      0
##  5     1      0
##  6     1      1
##  7     1      1
##  8     1      0
##  9     0      1
## 10     0      1
## 11     0      0
## 12     1      0
## 13     1      0
## 14     1      1
## 15     1      1
## 16     0      1
## 17     1      0
## 18     0      1
## 19     0      0
## 20     0      1

## re-run as sensitivity analysis
data_lipids_glmnet_inter_CompletVal_sens <- data_lipids_glmnet_inter_CompletVal_sens %>% 
  select(-vegan)

modelac <- "elanet_lipid_inter_CompletVal_sens"

assign(
  modelac,
  run(
    expr = clust_glmnet_sep(
      data = data_lipids_glmnet_inter_CompletVal_sens,
      outcome = "vegan2",
      clust_id = "Sample",
      sample_method = "oos_boot",
      N = 40,
      alphas = c(0, 0.2, 0.4),
      family = "binomial",
      seed = 478
    ),
    path = paste0("gitignore/run/", modelac)
  )
)

elanet_lipid_inter_CompletVal_sens$model_summary
##   alpha   lambda       auc auc_OutOfSample auc_oos_CIL auc_oos_CIU accuracy
## 1     0 35.45117 0.5852381       0.4669625   0.3418344   0.5882619   0.5625
##   accuracy_OutOfSample accuracy_oos_CIL accuracy_oos_CIU
## 1            0.5097026        0.3768822        0.5964983
elanet_lipid_inter_CompletVal_sens$country_AUC
##   auc_OutOfSample_IT auc_oos_CIL_IT auc_oos_CIU_IT auc_OutOfSample_CZ
## 1          0.4705328      0.2934007       0.619567           0.470364
##   auc_oos_CIL_CZ auc_oos_CIU_CZ
## 1      0.3071027      0.6555497

elanet_lipid_inter_CompletVal_sens$plot

Receiver operating characteristic (ROC) curves from a random subset of out-of-bag bootstrap iterations run on data with randomly permuted diet labels. As above with original data, each curve corresponds to an elastic net model trained on a bootstrap resample and evaluated on the subjects not included in that iteration (i.e., out-of-bag samples). The curve plots the true positive rate (sensitivity) against the false positive rate (1 – specificity) across thresholds of predicted vegan probability. The area under the curve (AUC) quantifies overall discriminatory performance, with values closer to 1 indicating stronger separation between groups

\(\rightarrow\) After randomly permuting diet labels and rerunning the full modelling pipeline, the out‑of‑sample AUC fell to 0.47 (95% CI: 0.34 to 0.59), consistent with chance performance and indicating no evidence of data leakage or systematic overfitting under label randomization.

5.6 Estimated coefficients

Open code
elanet_lipid_inter_CompletVal$betas
## 93 x 1 sparse Matrix of class "dgCMatrix"
##                            s0
## (Intercept)        1.14734856
## ACar 16:0         -0.11895422
## ACar 18:1          0.36571664
## ACar 18:2          0.66269097
## CE 16:1           -0.21328195
## CE 20:3            0.05914187
## CE 20:4           -0.06491718
## CE 22:6           -0.43234646
## Cer 18:1_22:0;O2  -0.16314255
## Cer 18:1_23:0;O2  -0.18302698
## Cer 18:1_24:0;O2   0.05821002
## Cer 18:1_24:1;O2   .         
## DG 16:0_18:1       0.02192424
## LPC 18:2/0:0       0.14576619
## LPC 20:1/0:0       0.66333103
## LPC 20:2/0:0       0.60436084
## LPC 20:5/0:0       0.22849995
## LPC 22:6/0:0      -0.46014040
## PC 12:0_16:0       0.04526106
## PC 14:0_16:0       0.06325636
## PC 14:0_17:0      -0.48398311
## PC 14:0_20:4       0.29365059
## PC 14:0_22:6       .         
## PC 15:0_18:2       .         
## PC 15:0_20:3      -0.06124312
## PC 15:0_20:4       .         
## PC 16:0_16:0       0.08868632
## PC 16:0_16:1       .         
## PC 16:0_18:0      -0.17289063
## PC 16:0_18:1       .         
## PC 16:0_20:3 (2)  -0.25620151
## PC 16:0_20:5      -0.10616262
## PC 16:0_22:4       .         
## PC 16:0_22:6      -0.39777332
## PC 16:1_18:2       0.88496421
## PC 17:0_18:1      -0.62160681
## PC 17:0_20:5 (2)   0.03199201
## PC 18:0_18:1       .         
## PC 18:0_20:3       0.22372760
## PC 18:0_22:5       .         
## PC 18:0_22:6      -0.29445992
## PC 18:1_18:1       0.19602648
## PC 18:1_18:2       0.61986950
## PC 18:1_20:3       0.46505623
## PC 18:1_20:4       0.10486485
## PC 18:2_18:2       0.36520820
## PC 18:2_18:3       0.47827048
## PC 33:1           -0.24300468
## PC 37:4           -0.87037828
## PC 37:6           -0.67414186
## PC 38:5            .         
## PC 42:5            0.84376077
## SM 31:1;O2        -0.91595323
## SM 32:0;O2        -0.05848643
## SM 32:2;O2         .         
## SM 33:1;O2        -1.00336079
## SM 35:2;O2        -0.46452404
## SM 36:0;O2         .         
## SM 36:2;O2        -0.07238433
## SM 38:1;O2        -0.18891808
## SM 39:1;O2        -0.74690237
## SM 41:1;O2         .         
## SM 43:1;O2        -0.69008631
## SM 43:2;O2        -0.51852289
## SM 43:2;O2 (2)    -0.56203728
## TG 12:0_14:0_18:1 -0.11916162
## TG 12:0_14:0_18:2 -0.36176997
## TG 12:0_16:0_18:1  .         
## TG 14:0_16:0_16:0  .         
## TG 14:0_16:0_18:1  .         
## TG 14:0_16:0_18:2  .         
## TG 15:0_16:0_18:2  0.05702390
## TG 15:0_18:1_18:2  .         
## TG 16:0_16:0_16:0  .         
## TG 16:0_16:0_18:0  .         
## TG 16:0_16:0_18:1  .         
## TG 16:0_16:0_18:3  .         
## TG 16:0_16:1_18:1  .         
## TG 16:0_17:0_18:1 -0.25526771
## TG 16:0_18:0_18:1 -0.25270935
## TG 16:0_18:1_18:1  .         
## TG 16:0_18:1_20:4  .         
## TG 16:0_18:1_22:6 -0.31181395
## TG 16:0_18:2_18:2  0.41723641
## TG 17:0_18:1_18:1  .         
## TG 18:0_18:1_20:4  .         
## TG 18:1_18:1_18:1  .         
## TG 18:1_18:1_18:2  0.24110776
## TG 18:1_18:2_18:2  0.33665795
## TG 18:1_18:2_18:3  0.33975817
## TG 18:1_18:2_20:4  0.05964121
## TG 18:2_18:2_18:3  0.44715751
## TG 54:6            0.47993284

5.7 Plot beta coefficients

Open code
elacoef <- data.frame(
  lipid = row.names(elanet_lipid_inter_CompletVal$betas),
  beta_ela = elanet_lipid_inter_CompletVal$betas[, 1]
) %>%
  arrange(abs(beta_ela)) %>%
  filter(abs(beta_ela) > 0,
         !grepl('Intercept', lipid)) %>%
  mutate(lipid = factor(lipid))


plotac <- "elanet_beta_lipids"
path <- "gitignore/figures"

assign(plotac, 
       ggplot(elacoef,
       aes(
         x = lipid,
         y = beta_ela)
       ) +
  geom_point() +
  geom_hline(yintercept = 0, color = "black") +
  labs(
    y = "Standardized beta coefficients",
    x = "Lipid"
  ) +
  theme_minimal() +
  coord_flip() + 
  theme(
    axis.text.x = element_text(size = 10),
    axis.text.y = element_text(size = 10),
    axis.title.x = element_text(size = 12),
    axis.title.y = element_text(size = 12),
    legend.position = "bottom"
  )
)

if (file.exists(paste0(path, "/", plotac, ".svg")) == FALSE) {
    ggsave(
    path = paste0(path),
    filename = plotac,
    device = "svg",
    width = 5,
    height = 10
  )
}

get(plotac)

Regression coefficients from the elastic net model predicting vegan diet strategy based on log2-transformed and standardized lipide levels. Lipids are ordered by the magnitude of the standardized coefficients, indicating their relative importance in distinguishing between the diet groups. The sign of each coefficient indicates the direction of association with vegan diet status, with positive values indicating a higher likelihood of vegan status and negative values indicating omnivore status. Lipids whose effects were shrunk to zero are not shown.

6 External validation

External validation was performed with an independent Czech cohort.

As a first step, we will use the previously developed and validated elastic net model to predict vegan status in the independent Czech cohort. The validation data will be standardized using the mean and standard deviation of each lipid from the training cohort to ensure comparability across datasets. For each subject in the external validation cohort, we will estimate the predicted probability of being vegan using the elastic net model. This predicted probability will then be used as a variable to discriminate between the diet groups in the independent cohort.

In a 2nd step, we will look at lipids that significantly differed between diet groups (average vegan diet effect across both countries, FDR < 0.05) estimated with linear models (one per lipid) with training cohort. Then we will fit linear models also for external validation cohort. Effect of vegan diet on these lipids will be shown along with 95% confidence interval for all cohorts: training Czech and Italian cohorts, but also in Czech independent (validating) cohort

6.1 Prediction of diet (elastic net)

6.1.1 Get table of weights, means and SDs

Open code

coefs_lipids_CompletVal <- get_coef(
  original_data = data_analysis,
  glmnet_model = elanet_lipid_inter_CompletVal)

coefs_lipids_CompletVal
## # A tibble: 93 × 5
##    predictor        beta_scaled beta_OrigScale  mean     SD
##    <chr>                  <dbl>          <dbl> <dbl>  <dbl>
##  1 (Intercept)           1.15          NA       NA   NA    
##  2 ACar 16:0            -0.119         -0.116   18.4  0.489
##  3 ACar 18:1             0.366          0.384   19.2  0.525
##  4 ACar 18:2             0.663          0.890   18.0  0.672
##  5 CE 16:1              -0.213         -0.443   20.0  1.04 
##  6 CE 20:3               0.0591         0.0760  21.1  0.642
##  7 CE 20:4              -0.0649        -0.105   23.8  0.807
##  8 CE 22:6              -0.432         -1.13    20.2  1.30 
##  9 Cer 18:1_22:0;O2     -0.163         -0.172   19.0  0.527
## 10 Cer 18:1_23:0;O2     -0.183         -0.204   19.0  0.556
## # ℹ 83 more rows

6.1.2 Identify shared and missing predictors

Open code
## Which are missing in the validation set
missing <- setdiff(
  coefs_lipids_CompletVal$predictor[-1], 
  colnames(
    data_lipids_validation
    )
  )

## Which are common with the validations et
common_predictors <- intersect(
  coefs_lipids_CompletVal$predictor, 
  colnames(data_lipids_validation))

6.1.3 Standardize data in validation set

Open code
data_lipids_validation_pred_CompletVal <- data_lipids_validation %>%
  dplyr::mutate(
    vegan = if_else(
      X2 == "VEGAN", 1, 0
    )
  ) %>%
  dplyr::select(
    vegan,
    dplyr::all_of(common_predictors)
  ) %>% 
  dplyr::mutate(
    across(
      .cols = -vegan,
      .fns = trans_lipid
      )
    ) %>% 
  dplyr::mutate(
    across(
      .cols = -vegan,
      .fns = ~ . 
      - coefs_lipids_CompletVal$mean[
        match(
          cur_column(), 
          coefs_lipids_CompletVal$predictor
          )
        ]
      )
    ) %>% 
  dplyr::mutate(
    across(
      .cols = -vegan,
      .fns = ~ . 
      / coefs_lipids_CompletVal$SD[
        match(
          cur_column(), 
          coefs_lipids_CompletVal$predictor
          )
        ]
      )
    ) 

6.1.4 Results of external validation

6.1.4.1 Figure

Open code
elanet_lipid_inter_CompletVal$fit
## 
## Call:  glmnet::glmnet(x = original_predictors, y = original_outcome,      family = family, alpha = optim_par$alpha[1], lambda = optim_par$lamb_1se[1],      standardize = standardize) 
## 
##   Df  %Dev   Lambda
## 1 64 97.06 0.003591

newx <- as.matrix(data_lipids_validation_pred_CompletVal[,-1])

predicted <- predict(
  elanet_lipid_inter_CompletVal$fit, 
  newx = newx)

tr <- data_lipids_validation_pred_CompletVal %>% 
  dplyr::mutate(
    predicted_logit = as.numeric(
      predict(
        elanet_lipid_inter_CompletVal$fit,
        newx = newx
        )
      )
    ) %>% 
  dplyr::mutate(
    predicted = inv_logit(predicted_logit)
  )

roc_lipid_CompletVal <- pROC::roc(
      vegan ~ predicted_logit,
      data = tr,
      direction = "<",
      levels = c(0, 1),
      ci = TRUE
      )

roc_lipid_CompletVal
## 
## Call:
## roc.formula(formula = vegan ~ predicted_logit, data = tr, direction = "<",     levels = c(0, 1), ci = TRUE)
## 
## Data: predicted_logit in 50 controls (vegan 0) < 86 cases (vegan 1).
## Area under the curve: 0.93
## 95% CI: 0.8787-0.9813 (DeLong)


plotac <- "roc_lipid"
path <- "gitignore/figures"

assign(plotac, ggroc(roc_lipid_CompletVal))
get(plotac)

Receiver operating characteristics (ROC) curve showing the model’s ability to discriminate between vegan and omnivore status according to lipids log2(level) in the external validation Czech cohort. The curve plots the true positive rate (sensitivity) against the true positive rate (specificity) at various thresholds of predicted vegan status, as estimated from the elastic net model developed on the training data. The area under the curve (AUC) represents the model’s overall performance, with values closer to 1 indicating stronger discrimination.
Open code

if (file.exists(paste0(path, "/", plotac, ".svg")) == FALSE) {  
  ggsave(
    path = paste0(path),
    filename = plotac,
    device = "svg",
    width = 6,
    height = 4.5
  )
}

6.1.4.2 Table

Open code

roc_lipid_CompletVal
## 
## Call:
## roc.formula(formula = vegan ~ predicted_logit, data = tr, direction = "<",     levels = c(0, 1), ci = TRUE)
## 
## Data: predicted_logit in 50 controls (vegan 0) < 86 cases (vegan 1).
## Area under the curve: 0.93
## 95% CI: 0.8787-0.9813 (DeLong)
mod <- elanet_lipid_inter_CompletVal

trainAUC <- mean(mod[["valid_performances"]]$auc_resamp_test)
trainCI <- quantile(mod[["valid_performances"]]$auc_resamp_test,
  probs = c(1 / 40, 39 / 40))

res <- data.frame(
  alpha = c(mod$model_summary$alpha, rep("", 4)),
  lambda = c(round(mod$model_summary$lambda, 4), rep("", 4)),
  `performance type` = c(
 "Training set AUC",
"Out-of-sample AUC (all)",
"Out-of-sample AUC (Czech)",
"Out-of-sample AUC (Italy)",
"External validation AUC"
  ),
  `performance [95% CI]` = c(
    sprintf("%.3f [%.3f to %.3f]", trainAUC, trainCI[1], trainCI[2]),
    sprintf("%.3f [%.3f to %.3f]",
            mod$model_summary$auc_OutOfSample,
            mod$model_summary$auc_oos_CIL,
            mod$model_summary$auc_oos_CIU),
    sprintf("%.3f [%.3f to %.3f]",
            mod$country_AUC$auc_OutOfSample_CZ,
            mod$country_AUC$auc_oos_CIL_CZ,
            mod$country_AUC$auc_oos_CIU_CZ),
    sprintf("%.3f [%.3f to %.3f]",
            mod$country_AUC$auc_OutOfSample_IT,
            mod$country_AUC$auc_oos_CIL_IT,
            mod$country_AUC$auc_oos_CIU_IT),
    sprintf("%.3f [%.3f to %.3f]",
            roc_lipid_CompletVal[["ci"]][2],
            roc_lipid_CompletVal[["ci"]][1],
            roc_lipid_CompletVal[["ci"]][3])
  )
)


kableExtra::kable(
  res %>% mutate(across(where(is.numeric), ~ round(.x, 3))),
  caption = 'Performance of the elastic‑net logistic regression model for discriminating vegan from omnivore status using log2‑transformed lipid levels. The model was developed on the combined training data (Czech and Italian cohorts), with the optimmized `alpha` (mixing parameter) and `lambda` (penalty strength) selected via 10-fold cross-validation. Internal validation employed 500 out‑of‑bag bootstrap resamples: the out‑of‑sample AUC is the mean across resamples, and its 95 % confidence interval (CI) is given by the 2.5th and 97.5th percentiles of the bootstrap distribution. The training‑set AUC and its CI were computed analogously from the in‑bag predictions. External validation was carried out on an independent Czech cohort; the reported AUC is the point estimate on that cohort, and its 95% CI was obtained with DeLong’s method.'
)
Performance of the elastic‑net logistic regression model for discriminating vegan from omnivore status using log2‑transformed lipid levels. The model was developed on the combined training data (Czech and Italian cohorts), with the optimmized alpha (mixing parameter) and lambda (penalty strength) selected via 10-fold cross-validation. Internal validation employed 500 out‑of‑bag bootstrap resamples: the out‑of‑sample AUC is the mean across resamples, and its 95 % confidence interval (CI) is given by the 2.5th and 97.5th percentiles of the bootstrap distribution. The training‑set AUC and its CI were computed analogously from the in‑bag predictions. External validation was carried out on an independent Czech cohort; the reported AUC is the point estimate on that cohort, and its 95% CI was obtained with DeLong’s method.
alpha lambda performance.type performance..95..CI.
0.2 0.0036 Training set AUC 1.000 [1.000 to 1.000]
Out-of-sample AUC (all) 0.999 [0.995 to 1.000]
Out-of-sample AUC (Czech) 1.000 [0.995 to 1.000]
Out-of-sample AUC (Italy) 0.998 [0.985 to 1.000]
External validation AUC 0.930 [0.879 to 0.981]

6.2 Diet effect across datasets

Similarly as in training data cohorts, we will fit linear model per each of the selected lipid level (\(log_{2}\) - transformed), with a single fixed effect factor of diet.

6.2.1 Linear models in validation cohort

Open code
## relevant lipids
diet_sensitive_lipids_narrowed <- result_lipidom_narrowed %>%
  filter(
    fdr_VGdiet_avg < 0.05,
    outcome %in% common_lipids
  ) %>%
  select(
    outcome
  ) %>% 
  pull()

len <- length(diet_sensitive_lipids_narrowed)

data_analysis_lipids <- data_lipids_validation %>%
  dplyr::mutate(
    Diet_VEGAN = as.numeric(
      dplyr::if_else(
        X2 == 'VEGAN', 1, 0
      )
    ),
    dplyr::across(
      all_of(common_lipids), ~ trans_lipid(.)
    )
  ) %>%
  dplyr::select(
    Diet_VEGAN,
    all_of(diet_sensitive_lipids_narrowed)
  ) 

Define number of lipids and covariates

Open code
n_covarites <- 1
n_features <- ncol(data_analysis_lipids) - n_covarites

Create empty objects

Open code
outcome <- vector('double', n_features)
log2FD_VGdiet <- vector('double', n_features)
P_VGdiet <- vector('double', n_features)
CI_L_VGdiet <- vector('double', n_features)
CI_U_VGdiet <- vector('double', n_features)

Fit linear models per outcome

Open code
for (i in 1:n_features) {
  ## define variable
  data_analysis_lipids$outcome <- data_analysis_lipids[, (i + n_covarites)]

  ## fit model
  model <- lm(outcome ~ Diet_VEGAN, data = data_analysis_lipids)

  ## save results
  outcome[i] <- names(data_analysis_lipids)[i + n_covarites]

  ## diet effect
  tr <- confint(model)

  CI_L_VGdiet[i] <- tr[which(row.names(tr) == "Diet_VEGAN"), ][1]
  CI_U_VGdiet[i] <- tr[which(row.names(tr) == "Diet_VEGAN"), ][2]

  log2FD_VGdiet[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Diet_VEGAN"
    ), 1
  ]

  P_VGdiet[i] <- summary(model)$coefficients[
    which(
      names(model$coefficients) == "Diet_VEGAN"
    ), 4
  ]
}

6.2.1.1 Results table

Open code
result_lipids_val <- data.frame(
  outcome,
  log2FD_VGdiet, P_VGdiet,
  CI_L_VGdiet, CI_U_VGdiet
)

kableExtra::kable(result_lipids_val,
                  caption = 'Results of linear models estimating the effect of diet on lipid levels. Only lipids that significantly differed between diet groups in training cohorts (FDR < 0.05, average effect across both training cohorts) were included. `log2FD` represents the estimated effects (regression coefficient), indicating how much the log2-transformed lipid levels differ between vegans and omnivores. `P`: p-value, `fdr`: p-value adjusted for multiple comparisons, and `CI_L` and `CI_U` represent the lower and upper bounds of the 95% confidence interval, respectively. All estimates in a single row are based on a single model.') 
Results of linear models estimating the effect of diet on lipid levels. Only lipids that significantly differed between diet groups in training cohorts (FDR < 0.05, average effect across both training cohorts) were included. log2FD represents the estimated effects (regression coefficient), indicating how much the log2-transformed lipid levels differ between vegans and omnivores. P: p-value, fdr: p-value adjusted for multiple comparisons, and CI_L and CI_U represent the lower and upper bounds of the 95% confidence interval, respectively. All estimates in a single row are based on a single model.
outcome log2FD_VGdiet P_VGdiet CI_L_VGdiet CI_U_VGdiet
ACar 16:0 -0.5028022 0.0000118 -0.7212793 -0.2843250
ACar 18:1 0.0820900 0.3824637 -0.1031998 0.2673797
ACar 18:2 0.7286756 0.0000003 0.4624246 0.9949265
CE 16:1 -1.8647972 0.0000000 -2.3364668 -1.3931275
CE 20:3 -0.1945497 0.3424132 -0.5984021 0.2093026
CE 20:4 -0.3873907 0.5270755 -1.5956422 0.8208607
CE 22:6 -0.5124270 0.0101127 -0.9008887 -0.1239654
Cer 18:1_22:0;O2 -0.2813535 0.0003326 -0.4324381 -0.1302689
Cer 18:1_23:0;O2 -0.6962920 0.0000000 -0.8683156 -0.5242683
Cer 18:1_24:0;O2 -0.1462821 0.0758080 -0.3079656 0.0154014
Cer 18:1_24:1;O2 -0.3460443 0.0003846 -0.5339566 -0.1581320
DG 16:0_18:1 -0.7144374 0.0006697 -1.1201088 -0.3087661
LPC 18:2/0:0 0.0230506 0.8346671 -0.1949518 0.2410530
LPC 20:1/0:0 0.5265789 0.0000454 0.2795521 0.7736056
LPC 20:2/0:0 0.3469295 0.0030167 0.1198106 0.5740484
LPC 20:5/0:0 -0.5215650 0.0013016 -0.8355875 -0.2075425
LPC 22:6/0:0 -0.4236188 0.0006118 -0.6623518 -0.1848859
PC 12:0_16:0 -0.0034524 0.9126054 -0.0655502 0.0586453
PC 14:0_16:0 -0.6713567 0.0000818 -0.9981032 -0.3446102
PC 14:0_17:0 -1.5113843 0.0000000 -1.7570143 -1.2657542
PC 14:0_20:4 -0.4064888 0.0039094 -0.6802815 -0.1326962
PC 14:0_22:6 -0.2764795 0.0606119 -0.5654590 0.0125000
PC 15:0_18:2 -0.2918721 0.0010145 -0.4636632 -0.1200809
PC 15:0_20:3 -1.1337061 0.0000000 -1.4546615 -0.8127507
PC 15:0_20:4 -1.3682678 0.0000000 -1.6038471 -1.1326885
PC 16:0_16:0 -0.3193942 0.0005493 -0.4978040 -0.1409844
PC 16:0_16:1 -0.9395622 0.0000000 -1.2569774 -0.6221471
PC 16:0_18:0 -0.3587661 0.0000013 -0.4985395 -0.2189927
PC 16:0_18:1 -0.3576436 0.0002475 -0.5454733 -0.1698138
PC 16:0_20:3 (2) -0.7273169 0.0000007 -1.0035818 -0.4510520
PC 16:0_20:5 -0.6070897 0.0000628 -0.8976142 -0.3165651
PC 16:0_22:4 -0.7089541 0.0000000 -0.9199857 -0.4979225
PC 16:0_22:6 -0.3021046 0.0253060 -0.5662535 -0.0379557
PC 16:1_18:2 0.1034871 0.7211244 -0.4687092 0.6756834
PC 17:0_18:1 -0.8793648 0.0000000 -1.0283255 -0.7304040
PC 18:0_18:1 -0.3636864 0.0000738 -0.5395167 -0.1878560
PC 18:0_22:5 -0.2108390 0.0199581 -0.3878870 -0.0337910
PC 18:0_22:6 -0.3098568 0.0065047 -0.5315403 -0.0881732
PC 18:1_18:1 0.3540101 0.0005977 0.1548899 0.5531304
PC 18:1_18:2 0.5751524 0.0000010 0.3537790 0.7965258
PC 18:1_20:3 0.2130899 0.0756011 -0.0222692 0.4484490
PC 18:1_20:4 -0.0860123 0.3851337 -0.2812517 0.1092270
PC 18:2_18:2 0.5882144 0.0000000 0.3952095 0.7812193
PC 18:2_18:3 -0.5279957 0.0001147 -0.7907476 -0.2652438
PC 33:1 -1.4561408 0.0000000 -1.6720708 -1.2402108
PC 37:4 -0.8234870 0.0000000 -1.0101749 -0.6367991
PC 37:6 -1.2684897 0.0000000 -1.5563660 -0.9806135
PC 38:5 -0.4998616 0.0000249 -0.7262047 -0.2735185
PC 42:5 0.2799372 0.0159441 0.0531346 0.5067399
SM 31:1;O2 -1.2374112 0.0000000 -1.4770634 -0.9977591
SM 32:0;O2 -0.2444154 0.0216110 -0.4523973 -0.0364336
SM 32:2;O2 -0.0945969 0.3320130 -0.2867599 0.0975662
SM 33:1;O2 -1.2548254 0.0000000 -1.4446355 -1.0650152
SM 35:2;O2 -0.8437361 0.0000000 -1.1257263 -0.5617460
SM 36:0;O2 -0.5101512 0.0105302 -0.8990778 -0.1212246
SM 36:2;O2 -0.4333411 0.0000043 -0.6121288 -0.2545534
SM 38:1;O2 0.0089836 0.9156286 -0.1584067 0.1763739
SM 39:1;O2 -0.6825834 0.0000000 -0.8626223 -0.5025445
SM 41:1;O2 -0.3822499 0.0000220 -0.5541366 -0.2103632
SM 43:1;O2 -2.4003237 0.0000000 -2.7813598 -2.0192875
SM 43:2;O2 -2.8914194 0.0000000 -3.4301227 -2.3527160
SM 43:2;O2 (2) -0.4648002 0.0004128 -0.7185975 -0.2110029
TG 12:0_14:0_18:1 -0.7281046 0.0097441 -1.2772600 -0.1789493
TG 12:0_14:0_18:2 -0.5517059 0.0723171 -1.1540974 0.0506857
TG 12:0_16:0_18:1 -0.8940659 0.0006862 -1.4027719 -0.3853599
TG 14:0_16:0_16:0 -0.8186462 0.0001155 -1.2262109 -0.4110814
TG 14:0_16:0_18:1 -1.2527260 0.0000024 -1.7557043 -0.7497476
TG 14:0_16:0_18:2 -0.7061220 0.0030258 -1.1685379 -0.2437062
TG 15:0_16:0_18:2 -1.3176931 0.0000000 -1.7094673 -0.9259189
TG 15:0_18:1_18:2 -0.8294257 0.0000006 -1.1422808 -0.5165705
TG 16:0_16:0_16:0 -0.9834078 0.0000170 -1.4192880 -0.5475275
TG 16:0_16:0_18:0 -0.9660437 0.0001306 -1.4509934 -0.4810941
TG 16:0_16:0_18:1 -1.2261273 0.0000007 -1.6909083 -0.7613463
TG 16:0_16:1_18:1 -0.5493706 0.5662103 -2.4388186 1.3400774
TG 16:0_17:0_18:1 -1.7773417 0.0000000 -2.1790846 -1.3755987
TG 16:0_18:0_18:1 -1.4689663 0.0000000 -1.9312332 -1.0066994
TG 16:0_18:1_18:1 -0.5415844 0.0007777 -0.8530296 -0.2301393
TG 16:0_18:1_20:4 -0.6883568 0.0000335 -1.0054790 -0.3712347
TG 16:0_18:1_22:6 -0.8090548 0.0003820 -1.2481149 -0.3699948
TG 16:0_18:2_18:2 0.7327644 0.0000421 0.3905884 1.0749405
TG 17:0_18:1_18:1 -1.3424652 0.0000000 -1.6559743 -1.0289560
TG 18:1_18:1_18:1 0.0873867 0.8356066 -0.7438707 0.9186440
TG 18:1_18:1_18:2 1.0182009 0.0000000 0.7440068 1.2923951
TG 18:1_18:2_18:2 1.5198202 0.0000000 1.1819320 1.8577083
TG 18:1_18:2_18:3 1.2146693 0.0000000 0.8932614 1.5360772
TG 18:1_18:2_20:4 0.4900993 0.0000852 0.2509448 0.7292538
TG 18:2_18:2_18:3 2.6387644 0.0000000 2.0361926 3.2413362
TG 54:6 0.1024785 0.2174244 -0.0610777 0.2660346
Open code

if(file.exists('gitignore/result_lipidom_validation.csv') == FALSE){
  write.table(result_lipids_val, 'gitignore/result_lipidom_validation.csv', row.names = FALSE)
  }

6.2.2 Forest plot

6.2.2.1 Data preparation

Open code

## subset result tables
result_lipids_subset <- result_lipidom %>%
  filter(outcome %in% diet_sensitive_lipids_narrowed)

result_lipids_val_subset <- result_lipids_val %>%
  filter(outcome %in% diet_sensitive_lipids_narrowed)

## create a data frame
data_forest <- data.frame(
  outcome = rep(diet_sensitive_lipids_narrowed, 3),
  beta = c(
    result_lipids_subset$log2FD_VGdiet_inCZ,
    result_lipids_subset$log2FD_VGdiet_inIT,
    result_lipids_val_subset$log2FD_VGdiet
  ),
  lower = c(
    result_lipids_subset$CI_L_VGdiet_inCZ,
    result_lipids_subset$CI_L_VGdiet_inIT,
    result_lipids_val_subset$CI_L_VGdiet
  ),
  upper = c(
    result_lipids_subset$CI_U_VGdiet_inCZ,
    result_lipids_subset$CI_U_VGdiet_inIT,
    result_lipids_val_subset$CI_U_VGdiet
  ),
  dataset = c(
    rep("CZ", len),
    rep("IT", len),
    rep("Validation", len)
  )
)

validation_order <- data_forest %>%
  group_by(outcome) %>%
  summarise(beta_mean = mean(beta), .groups = "drop") %>%
  arrange(beta_mean) %>%
  pull(outcome)

up_winners <- data_forest %>% 
  pivot_wider(names_from = dataset,
              values_from = c(beta, lower, upper)) %>% 
  left_join(
    elacoef %>% mutate(outcome = lipid) %>% select(-lipid), 
    by = 'outcome') %>% 
  filter(beta_CZ > 0,
         beta_IT > 0,
         lower_Validation > 0,
         beta_ela > 0.1) %>% 
  select(outcome)

down_winners <- data_forest %>% 
  pivot_wider(names_from = dataset,
              values_from = c(beta, lower, upper)) %>% 
  left_join(elacoef %>% mutate(outcome = lipid) %>% select(-lipid),
            by = 'outcome') %>% 
  filter(beta_CZ < 0,
         beta_IT < 0,
         upper_Validation < 0,
         beta_ela < -0.1) %>% 
  select(outcome)

winners <- as.character(c(up_winners$outcome, down_winners$outcome))

 data_forest <- data_forest %>%
  mutate(in_winner = if_else(outcome %in% winners, TRUE, FALSE, missing = FALSE)) %>%
  left_join(
    elacoef %>% mutate(outcome = lipid) %>% select(-lipid), 
    by = 'outcome') %>%  
   mutate(outcome = factor(outcome, levels = validation_order))

6.2.2.2 Plotting

Open code
colors <- c("CZ" = "#150999", "IT" = "#329243", "Validation" = "grey60")

plotac <- "forest_lipid"
path <- "gitignore/figures"

assign(
  plotac,
  ggplot(data_forest, aes(x = outcome, y = beta, ymin = lower, ymax = upper, color = dataset)) +
    geom_pointrange(position = position_dodge(width = 0.5), size = 0.5) +
    geom_hline(yintercept = 0, color = "black") +
    geom_errorbar(position = position_dodge(width = 0.5), width = 0.2) +
    scale_color_manual(values = colors) +
    labs(
      y = "Effect of vegan diet on log2-trasformed lipid level",
      x = "Outcome",
      color = "Dataset"
    ) +
    theme_minimal() +
    coord_flip() +
    scale_x_discrete(
    labels = setNames(
      ifelse(data_forest$in_winner, 
             paste0("**", data_forest$outcome, "**"), 
             as.character(data_forest$outcome)
      ), data_forest$outcome
    )
  ) +
  theme(
    axis.text.x = element_text(size = 10),
    axis.text.y = ggtext::element_markdown(size = 10),  
    axis.title.x = element_text(size = 12),
    axis.title.y = element_text(size = 12),
    legend.position = "bottom"
  )
)

get(plotac)

The forest plot illustrates the effects of a vegan diet on the levels of selected log2-transformed lipid lelves, along with their 95% confidence intervals, across two training cohorts (Czech and Italian) and one independent Czech cohort (validation). Points/lines in green, blue and grey colors represent the difference in lipid levels between vegans and omnivores within the Italian, Czech and validation cohort respectively. Positive values suggest a higher lipid level in vegans compared to omnivores. Only lipids that showed significant differences between vegan and omnivorous diets in training cohorts (FDR < 0.05, average effect across both countries) were selected, and these effects were further validated in the independent cohort. The estimates for the training cohorts were obtained from a single linear model that included Diet, Country, and the interaction term Diet:Country as predictors. In the validation cohort, Diet was the only fixed-effect predictor. Lipids validated in the linear model and showing predictive power in the elastic net model (|β| > 0.1) are bold
Open code

if (file.exists(paste0(path, "/", plotac, ".svg")) == FALSE) {
  ggsave(
    path = paste0(path),
    filename = plotac,
    device = "svg",
    width = 6,
    height = 16
  )
}

6.2.3 Boxplot

Open code
plotac <- "boxplot_lipidom"
path <- "gitignore/figures"

colo <- c('#F9FFAF','#329243')

boxplot_cond <- function(variable) {
  
  p <- ggboxplot(data_merged_log2, 
                 x = 'Diet', 
                 y = variable, 
                 fill = 'Diet', 
                 tip.length = 0.15,
                 palette = colo,
                 outlier.shape = 1,
                 lwd = 0.25,
                 outlier.size = 0.8,
                 facet.by = 'Data',
                 title = variable,
                 ylab = 'Log2(lipid level)') +
    
    theme(
      plot.title = element_text(size = 10), 
      axis.title = element_text(size = 8),  
      axis.text.y = element_text(size = 7),
      axis.text.x = element_blank(),
      axis.title.x = element_blank()
    ) 
  return(p)
}

# Plot all outcomes
plots <- map(diet_sensitive_lipids_narrowed, boxplot_cond)

# Create a matrix of plots
assign(plotac, 
       ggarrange(plotlist = plots, ncol = 7, nrow = 13,  common.legend = TRUE)
       )

get(plotac)

Log2-traqnsformed lipids levels across all 3 cohorts (Czech and Italian training cohorts and an independent Czech valdiation cohort) and across dietary groups
Open code

if (file.exists(paste0(path, "/", plotac, ".svg")) == FALSE) {  
  ggsave(
    path = paste0(path),
    filename = plotac,
    device = "svg",
    width = 16,
    height = 14
  )
}

7 Reproducibility

Open code
sessionInfo()
## R version 4.4.3 (2025-02-28)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 22.04.5 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=cs_CZ.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=cs_CZ.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=cs_CZ.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=cs_CZ.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: Europe/Prague
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] vegan_2.6-6.1         lattice_0.22-5        permute_0.9-7        
##  [4] zCompositions_1.5.0-4 truncnorm_1.0-8       NADA_1.6-1.1         
##  [7] survival_3.7-0        MicrobiomeStat_1.2    glmnet_4.1-8         
## [10] pROC_1.18.0           arm_1.12-2            lme4_1.1-35.5        
## [13] Matrix_1.7-0          MASS_7.3-65           car_3.1-2            
## [16] carData_3.0-5         emmeans_1.10.4        brms_2.21.0          
## [19] Rcpp_1.0.13           rms_6.8-1             Hmisc_5.1-3          
## [22] glmmTMB_1.1.9         ggtext_0.1.2          ggdist_3.3.2         
## [25] cowplot_1.1.1         ggpubr_0.4.0          sjPlot_2.8.16        
## [28] kableExtra_1.4.0      flextable_0.9.6       gtsummary_2.0.2      
## [31] compositions_2.0-8    janitor_2.2.0         stringi_1.7.6        
## [34] lubridate_1.8.0       forcats_1.0.0         stringr_1.5.1        
## [37] dplyr_1.1.4           purrr_1.0.2           readr_2.1.2          
## [40] tidyr_1.3.1           tibble_3.2.1          ggplot2_3.5.1        
## [43] tidyverse_1.3.1       readxl_1.3.1          openxlsx_4.2.8       
## [46] RJDBC_0.2-10          rJava_1.0-6           DBI_1.1.2            
## 
## loaded via a namespace (and not attached):
##   [1] fs_1.6.4                matrixStats_1.3.0       httr_1.4.2             
##   [4] insight_0.20.2          numDeriv_2016.8-1.1     tools_4.4.3            
##   [7] backports_1.5.0         sjlabelled_1.2.0        utf8_1.2.4             
##  [10] R6_2.5.1                mgcv_1.9-1              withr_3.0.1            
##  [13] Brobdingnag_1.2-7       prettyunits_1.1.1       gridExtra_2.3          
##  [16] bayesm_3.1-6            quantreg_5.98           cli_3.6.3              
##  [19] textshaping_0.3.6       performance_0.12.2      officer_0.6.6          
##  [22] sandwich_3.0-1          labeling_0.4.2          mvtnorm_1.1-3          
##  [25] robustbase_0.93-9       polspline_1.1.25        ggridges_0.5.3         
##  [28] askpass_1.1             QuickJSR_1.3.1          commonmark_1.9.1       
##  [31] systemfonts_1.0.4       StanHeaders_2.32.10     foreign_0.8-90         
##  [34] gfonts_0.2.0            svglite_2.1.3           rstudioapi_0.16.0      
##  [37] httpcode_0.3.0          generics_0.1.3          shape_1.4.6            
##  [40] distributional_0.4.0    zip_2.2.0               inline_0.3.19          
##  [43] loo_2.4.1               fansi_1.0.6             abind_1.4-5            
##  [46] lifecycle_1.0.4         multcomp_1.4-18         yaml_2.3.5             
##  [49] snakecase_0.11.1        grid_4.4.3              promises_1.2.0.1       
##  [52] crayon_1.5.0            haven_2.4.3             pillar_1.9.0           
##  [55] knitr_1.48              statip_0.2.3            boot_1.3-31            
##  [58] estimability_1.5.1      codetools_0.2-19        glue_1.7.0             
##  [61] V8_4.4.2                fontLiberation_0.1.0    data.table_1.15.4      
##  [64] vctrs_0.6.5             cellranger_1.1.0        gtable_0.3.0           
##  [67] assertthat_0.2.1        datawizard_0.12.2       xfun_0.46              
##  [70] mime_0.12               coda_0.19-4             modeest_2.4.0          
##  [73] timeDate_3043.102       iterators_1.0.14        statmod_1.4.36         
##  [76] ellipsis_0.3.2          TH.data_1.1-0           nlme_3.1-168           
##  [79] fontquiver_0.2.1        rstan_2.32.6            fBasics_4041.97        
##  [82] tensorA_0.36.2.1        TMB_1.9.14              rpart_4.1.24           
##  [85] colorspace_2.0-2        nnet_7.3-20             tidyselect_1.2.1       
##  [88] processx_3.8.4          timeSeries_4032.109     compiler_4.4.3         
##  [91] curl_4.3.2              rvest_1.0.2             htmlTable_2.4.0        
##  [94] SparseM_1.81            xml2_1.3.3              fontBitstreamVera_0.1.1
##  [97] posterior_1.6.0         checkmate_2.3.2         scales_1.3.0           
## [100] DEoptimR_1.0-10         callr_3.7.6             spatial_7.3-15         
## [103] digest_0.6.37           minqa_1.2.4             rmarkdown_2.27         
## [106] htmltools_0.5.8.1       pkgconfig_2.0.3         base64enc_0.1-3        
## [109] stabledist_0.7-2        dbplyr_2.1.1            fastmap_1.2.0          
## [112] rlang_1.1.4             htmlwidgets_1.6.4       shiny_1.9.1            
## [115] farver_2.1.0            zoo_1.8-9               jsonlite_1.8.8         
## [118] magrittr_2.0.3          Formula_1.2-4           bayesplot_1.8.1        
## [121] munsell_0.5.0           gdtools_0.3.7           stable_1.1.6           
## [124] plyr_1.8.6              pkgbuild_1.3.1          parallel_4.4.3         
## [127] ggrepel_0.9.5           sjmisc_2.8.10           ggeffects_1.7.0        
## [130] splines_4.4.3           gridtext_0.1.5          hms_1.1.1              
## [133] sjstats_0.19.0          ps_1.7.7                uuid_1.0-3             
## [136] markdown_1.13           ggsignif_0.6.3          stats4_4.4.3           
## [139] rmutil_1.1.10           rstantools_2.1.1        crul_1.5.0             
## [142] reprex_2.0.1            evaluate_1.0.0          RcppParallel_5.1.8     
## [145] modelr_0.1.8            nloptr_2.0.0            tzdb_0.2.0             
## [148] foreach_1.5.2           httpuv_1.6.5            MatrixModels_0.5-3     
## [151] openssl_1.4.6           clue_0.3-65             broom_1.0.6            
## [154] xtable_1.8-4            rstatix_0.7.0           later_1.3.0            
## [157] viridisLite_0.4.0       ragg_1.2.1              lmerTest_3.1-3         
## [160] cluster_2.1.8.1         bridgesampling_1.1-2

References

Lenth, Russell V. 2024. “Emmeans: Estimated Marginal Means, Aka Least-Squares Means.” https://CRAN.R-project.org/package=emmeans.